QRY question: If field1 is null then field2
From: Dan (dannyjoered_at_aol.com)
Date: 03/24/04
- Previous message: Steve Kass: "Re: maximum prefixes"
- Next in thread: Steve Kass: "Re: QRY question: If field1 is null then field2"
- Reply: Steve Kass: "Re: QRY question: If field1 is null then field2"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 24 Mar 2004 10:25:11 -0800
Is there a way to create a column that will show the
value of field1 unless field1 is null in which case it
will show the value of field2? I do it all the time in
Access but can't seem to figure out if SQL Server can do
it as well. Any help or suggestions are geratly
appreciatd!
Here is how I do it in MS Access:
SELECT IIf([Field1] Is Null,[Field2],[Field1]) AS [Output]
FROM [Table];
- Previous message: Steve Kass: "Re: maximum prefixes"
- Next in thread: Steve Kass: "Re: QRY question: If field1 is null then field2"
- Reply: Steve Kass: "Re: QRY question: If field1 is null then field2"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|