Jul 11, 2002 #1 sexydog Programmer Jul 9, 2002 176 GB can i use an if then in the where clause i want to select amount but if it is ='' then i want to replace it with amount = 0.00
can i use an if then in the where clause i want to select amount but if it is ='' then i want to replace it with amount = 0.00
Jul 11, 2002 1 #2 dbtech MIS Jul 2, 2001 55 SG U can make use of CASE Statements. Please post your full query. Anway this is how its done SELECT Amount FROM tablename WHERE Amount=(CASE WHEN Amount ='' THEN 0 END) dbtech Upvote 0 Downvote
U can make use of CASE Statements. Please post your full query. Anway this is how its done SELECT Amount FROM tablename WHERE Amount=(CASE WHEN Amount ='' THEN 0 END) dbtech
Jul 11, 2002 #3 VJJ IS-IT--Management Nov 5, 2002 1 US try isnull as in: select isnull(amount,0.0).... Upvote 0 Downvote