Query a Mainframe detect Null Values

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Query a Mainframe detect Null Values

cfishernyc
I am trying to query data from a mainframe database using ODBC (we do not have showcase query). My main issue is i need to tell SPSS to look for instances where a variable in the database could be NULL. When using ACCESS to pull this data the approach of {ORDRNO='001' or IS NULL} works. Is there an equivalent in SPSS ODBC?
Reply | Threaded
Open this post in threaded view
|

Re: Query a Mainframe detect Null Values

Albert-Jan Roskam
Why couldn't you use IS NULL in the SQl query inside the GET DATA command?

GET DATA /TYPE=ODBC /CONNECT=
 'DRIVER=SQL Server;'
 'SERVER=myserver;'
 'DATABASE=mydb;'
 'Trusted_Connection=Yes'
 /SQL =
 'SELECT var1, var2 FROM Table'
 'WHERE var1 IS NOT NULL' 
.
Cheers!!
Albert-Jan

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In the face of ambiguity, refuse the temptation to guess.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

--- On Thu, 3/4/10, cfishernyc <[hidden email]> wrote:

From: cfishernyc <[hidden email]>
Subject: [SPSSX-L] Query a Mainframe detect Null Values
To: [hidden email]
Date: Thursday, March 4, 2010, 12:26 AM

I am trying to query data from a mainframe database using ODBC (we do not
have showcase query). My main issue is i need to tell SPSS to look for
instances where a variable in the database could be NULL. When using ACCESS
to pull this data the approach of {ORDRNO='001' or IS NULL} works. Is there
an equivalent in SPSS ODBC?
--
View this message in context: http://old.nabble.com/Query-a-Mainframe-detect-Null-Values-tp27773120p27773120.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
LISTSERV@... (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD