Re: NZ Function?
From: Dan Guzman (guzmanda_at_nospam-online.sbcglobal.net)
Date: 12/06/04
- Next message: John316: "Re: Parsing Like Data for Consolidation..."
- Previous message: Joe Williams: "NZ Function?"
- In reply to: Joe Williams: "NZ Function?"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 6 Dec 2004 08:26:39 -0600
You can use COALESCE or ISNULL:
SELECT COALESCE(MyColumn, 0) AS MyColumn
FROM MyTable
SELECT ISNULL(MyColumn, 0) AS MyColumn
FROM MyTable
-- Hope this helps. Dan Guzman SQL Server MVP "Joe Williams" <JOE@ANYWHERE.com> wrote in message news:eFbmT752EHA.3236@TK2MSFTNGP15.phx.gbl... > hi, > > In Access I can use the NZ() function to convert null fields to zero in a > SQL select statement. I put it in a SQL view and I get an unknown function > error. How do I do it in SQL and can you give me an example? Thanks! > > Joe >
- Next message: John316: "Re: Parsing Like Data for Consolidation..."
- Previous message: Joe Williams: "NZ Function?"
- In reply to: Joe Williams: "NZ Function?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|