Last post Jan 10, 2013 01:08 PM by Joey_Blue
Jan 10, 2013 12:50 AM|GaurangNaik|LINK
I am little weak in SQL Server queries. I have a table xyz which has a column Price nvarchar(100). Now the problem is accidently some string values got inserted in it. now i need to find out only those rows which has those string entries for Price column.
SELECT * FROM xyz WHERE price <> CAST(price AS INT)and price is not null
But its not working.
Jan 10, 2013 12:58 AM|Sujeet Saste|LINK
Refer below link :
Take backup of your database when you are going to try on your live database.
Jan 10, 2013 01:08 PM|Joey_Blue|LINK
You can try the IsNumeric function:
WHERE isnumeric(price) = 0 and price is not null;
I put together a post on the
Note that there are a few problems with IsNumeric: