on 04-24-2014 3:38 PM
Hello ,
In SAP B1 rdr1 table 'free text' field hold the original value of price , even if I change the value of price free text field holds the old value, I need to compare these two fields as not equal like
SELECT T0.[DocNum] FROM ORDR T0 INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry WHERE T1.[Price] <> T1.[FreeTxt]
to get all the sales order numbers where there was a price change.
But this gives me error as 'error converting nvarchar to numeric.
So pls help me to resolve this .
Rgds
Suman
Hi,
Error message due to two different format of fields.
Free text--->nVarChar
Unit price --->Numeric
Thanks & Regards,
Nagarajan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Please close this thread by marking correct/helpful answer.
Thanks & Regards,
Nagarajan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Suman,
To compare text with number is never a good idea even if you convert the text in the query.
That will be unreliable. It is better create a numeric UDF to store the price to compare with.
Thanks,
Gordon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
SELECT T0.[DocNum] FROM ORDR T0 INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry WHERE T1.[Price] <> cast (T1.[FreeTxt] as money)
Kind regards
Agustín Marcos Cividanes
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
102 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.