Jul 11, 2002 #1 sexydog Programmer Joined Jul 9, 2002 Messages 176 Location 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 Joined Jul 2, 2001 Messages 55 Location 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 Joined Nov 5, 2002 Messages 1 Location US try isnull as in: select isnull(amount,0.0).... Upvote 0 Downvote