[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Converting an Access query with NZ function to MSSQL

Posted on 2006-05-30
4
Medium Priority
?
404 Views
Last Modified: 2008-02-26
Hi guys,

I have a basic one to ask this time.

I have this query, which works in Access, and I need to make an MSSQL version as well, anyone able to help?

SELECT tblData.ID, tblData.Info, NZ(tblLookup.Filename,"default.jpg") AS FName
FROM tblData LEFT JOIN tblLookup ON tblData.ID = tblLookup.ID;


Cheers!
0
Comment
Question by:Cyber-Drugs
  • 3
4 Comments
 
LVL 14

Expert Comment

by:GGuzdziol
ID: 16791219
SELECT tblData.ID, tblData.Info, isnull(tblLookup.Filename,"default.jpg") AS FName
FROM tblData LEFT JOIN tblLookup ON tblData.ID = tblLookup.ID;
0
 
LVL 14

Expert Comment

by:GGuzdziol
ID: 16791231
probably You need to replace double quotes with single

SELECT tblData.ID, tblData.Info, NZ(tblLookup.Filename,'default.jpg') AS FName
FROM tblData LEFT JOIN tblLookup ON tblData.ID = tblLookup.ID;
0
 
LVL 14

Accepted Solution

by:
GGuzdziol earned 2000 total points
ID: 16791250
Uhmm sorry. Final version:

SELECT tblData.ID, tblData.Info, isnull(tblLookup.Filename,'default.jpg') AS FName
FROM tblData LEFT JOIN tblLookup ON tblData.ID = tblLookup.ID;
0
 
LVL 4

Author Comment

by:Cyber-Drugs
ID: 16796384
Perfect, cheers!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question