Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
werhardt
Constraint Violating Yak Guru
270 Posts |
Posted - 2008-01-25 : 11:21:03
|
I have a query and I need to be able to take negative numbers out of it, example -16495.00. I am not sure how to add it to my where clause. I was going to put clm_tchg <> ‘-‘ I know that isn’t right, but I don’t know how to write it. Please help, Thanks. |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-01-25 : 11:24:27
|
WHERE clm_tchg > 0 if its of int typeif varchar use,WHERE CAST(clm_tchg AS int) <0 orCHARINDEX('-',clm_tchg)=0 |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-01-28 : 01:29:58
|
If it is of varchar then alter the column to proper decimal or float typeMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|