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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CASE Question

Status
Not open for further replies.

load3d

Programmer
Feb 27, 2008
117
US
What would be the proper syntax for this? I want to use openquery to open another query if the value is null. Is it possible to do that? I'm using SQL server 2005


EXAMPLE:

CASE WHEN (COLUMNNAME)ISNULL THEN Openquery(Servername 'Select TOP 1 from dbo.db.column inner join on columname) else 'DEFAULT JOB FUNCTION' END

 
case when ColumnName IS NULL then ... ELSE 'DEFAULT JOB FUNCTION' END
 
let me rephrase.... is it possible to select a value from a different query in case statement using the openquery function? I tried to do it... but I'm not sure if it's possible.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top