That will do what I need it to do.  Thanks a lot!

Mark W. Breneman
-Macromedia Certified ColdFusion Developer
-Network / Web Server Administrator
  Vivid Media
  [EMAIL PROTECTED]
  www.vividmedia.com
  608.270.9770

-----Original Message-----
From: Dave Watts [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 19, 2002 12:17 PM
To: CF-Talk
Subject: RE: change binary values 1/0 to T/F in a SQL query? Possible?


> I think I have seen this before... Does anyone know if it
> is possible to get SQL (MS SQL 7 server) to dynamically
> change the value of a column?
>
> I need to change binary values 1/0 to T/F in a SQL statement.
>
> I am looking for something like:
> Select Fname, lname, IF (member){ "T" else "F"}
> From members

Yes, you can use the CASE statement to do this:

SELECT  FName,
                LName,
                CASE member
                        WHEN 1 THEN 'T'
                        ELSE 'F'
                END AS member_str
FROM            members

There may be more efficient ways to do this, also, but this is what came to
mind first.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to