TECH_NET
asked on
Check the value of a decimal type column
I have a SQL table column X which hold a data type varchar2
I have the table populated with some records.
and the data looks like
21.98
23.87
34.12 OFF
12.23
etc
I want to find the row that does not hold a value price. How can i find it.
I need the row 34.12 OFF to be retrieved for the illustration.
I have the table populated with some records.
and the data looks like
21.98
23.87
34.12 OFF
12.23
etc
I want to find the row that does not hold a value price. How can i find it.
I need the row 34.12 OFF to be retrieved for the illustration.
ASKER
It works great. Exactly what i wanted. Now another question.
one of the value of the price column was
Skil 7.2-volt Lithium-Ion Power Wrench -
How can i update the another column Y, with the value of the PRICE, and if the column Y has a value , can i append the value of the PRICE column to value of column Y.
I increased the points to 500
one of the value of the price column was
Skil 7.2-volt Lithium-Ion Power Wrench -
How can i update the another column Y, with the value of the PRICE, and if the column Y has a value , can i append the value of the PRICE column to value of column Y.
I increased the points to 500
Update myTable Set Y = IsNull(Y, '') + IsNull(X, '')
Where IsNumeric(X) = 0
The IsNulls are there to catch any instance where you don't have an existing value in Y or in the event the data in column X is null.
Where IsNumeric(X) = 0
The IsNulls are there to catch any instance where you don't have an existing value in Y or in the event the data in column X is null.
My code will update all of your Y columns. Are you wanting to do this on a row-by-row basic?
ASKER
yes, i want to update only rows where the column of price is not numeric,
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you for your quick responses.
This will catch any non numeric rows.