Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Revise iif expressions to SSMS 1

Status
Not open for further replies.

ciarra41

Technical User
Sep 11, 2006
116
US
I normally run this in Access but now I need to do the same thing using SSMS-Express. However it’s a little different. Could someone revise this two to do the same thing?

IIf(IsNull([mytable.acttnum]),"",[[tn_npa] & "" & [tncop] & "" & [tnline])
and
customer:(UCase([FIRST_NAME]) & " " & UCase([LAST_NAME]))
 
You need to use a case statement, I'm not very clued up on SSMS-Express but I'm pretty sure it supports it!
 
case when mytable.acttnum is null
then ''
else tn_npa + '' + tncop + '' + tnline
end

UPPER(FIRST_NAME) + ' ' + UPPER(LAST_NAME]) AS customer

r937.com | rudy.ca
 
Hi r9387
On your first example I'm not sure where to put this.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top