Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / SQL Server / ADP / May 2007

Tip: Looking for answers? Try searching our database.

Catching a NULL in INT column in CURSOR in a SP

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
riyaz.mansoor@gmail.com - 29 May 2007 10:39 GMT
Hi

In my SP I am opening a VIEW as a CURSOR. The view returns all NULLs
if there are no records in the underlying table. This breaks my SP
namely - cannot SELECT INTO @intVar when the actual value is a NULL.

It would be perfect if I could convert all NULLs to zeros.

Since the views were done by someone else, I do NOT want to modify the
view (ie, include COALESCE function). I would like to solve this in
the SP itself but I don't know how to start.

Riyaz
Bob - 29 May 2007 15:13 GMT
Can you use:
SELECT INTO @intVar Case When [YourColumn] is null then 0 else [YourColumn]
End
hth
Bob.

> Hi
>
[quoted text clipped - 9 lines]
>
> Riyaz
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.