sql statements

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

sql statements

Rodrigo Briceño-2
Dear SPSS Listers. Is there a way to get a list of SQL statements that
can be used to read tables with ODBC functionality. I am reading data
from SQL tables, but I would like to be sure with kind of SQL
statements can I use in order to make filters and other operations.

THanks!

--
Rodrigo Briceño
Economist
[hidden email]
MSN: [hidden email]
SKYPE: rbriceno1087

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (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
Reply | Threaded
Open this post in threaded view
|

Re: sql statements

Jon K Peck
You can refer to the Microsoft ODBC standard and compare that with the ODBC level of the driver of interest, but you may need to consult the vendor of the particular database you are using as the SQL that is accepted may have limits both in terms of SQL constructs and the complexity of the statement.  In my experience, though, the big three databases (Oracle, SQL Server, DB2) can handle pretty much any SQL you throw at them.

Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
new phone: 720-342-5621




From:        Rodrigo Briceño <[hidden email]>
To:        [hidden email]
Date:        01/18/2012 08:46 PM
Subject:        [SPSSX-L] sql statements
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Dear SPSS Listers. Is there a way to get a list of SQL statements that
can be used to read tables with ODBC functionality. I am reading data
from SQL tables, but I would like to be sure with kind of SQL
statements can I use in order to make filters and other operations.

THanks!

--
Rodrigo Briceño
Economist
[hidden email]
MSN: [hidden email]
SKYPE: rbriceno1087

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (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


Reply | Threaded
Open this post in threaded view
|

Re: sql statements

Rick Oliver-3
In reply to this post by Rodrigo Briceño-2
The acceptable SQL SELECT syntax is database-dependent. It's not a matter of what SPSS accepts; it's a matter of what the database driver accepts.


Rick Oliver
Senior Information Developer
IBM Business Analytics (SPSS)
E-mail: [hidden email]
Phone: 312.893.4922 | T/L: 206-4922




From:        Rodrigo Briceño <[hidden email]>
To:        [hidden email]
Date:        01/18/2012 09:51 PM
Subject:        sql statements
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Dear SPSS Listers. Is there a way to get a list of SQL statements that
can be used to read tables with ODBC functionality. I am reading data
from SQL tables, but I would like to be sure with kind of SQL
statements can I use in order to make filters and other operations.

THanks!

--
Rodrigo Briceño
Economist
[hidden email]
MSN: [hidden email]
SKYPE: rbriceno1087

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (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


Reply | Threaded
Open this post in threaded view
|

Re: sql statements

Rodrigo Briceño-2
Thanks Rick. I do not have enough knowledge about drivers and database
management, so I need to ask to the person who installed SPSS. In
order to ask the proper question to him, can you explain me a little
bit how to identify which database driver my spss is using?

Thanks for your help!

2012/1/18 Rick Oliver <[hidden email]>:

> The acceptable SQL SELECT syntax is database-dependent. It's not a matter of
> what SPSS accepts; it's a matter of what the database driver accepts.
>
>
> Rick Oliver
> Senior Information Developer
> IBM Business Analytics (SPSS)
> E-mail: [hidden email]
> Phone: 312.893.4922 | T/L: 206-4922
>
>
>
> From:        Rodrigo Briceño <[hidden email]>
> To:        [hidden email]
> Date:        01/18/2012 09:51 PM
> Subject:        sql statements
> Sent by:        "SPSSX(r) Discussion" <[hidden email]>
> ________________________________
>
>
>
> Dear SPSS Listers. Is there a way to get a list of SQL statements that
> can be used to read tables with ODBC functionality. I am reading data
> from SQL tables, but I would like to be sure with kind of SQL
> statements can I use in order to make filters and other operations.
>
> THanks!
>
> --
> Rodrigo Briceño
> Economist
> [hidden email]
> MSN: [hidden email]
> SKYPE: rbriceno1087
>
> =====================
> To manage your subscription to SPSSX-L, send a message to
> [hidden email] (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
>
>



--
Rodrigo Briceño
Economist
[hidden email]
MSN: [hidden email]
SKYPE: rbriceno1087

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (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
Reply | Threaded
Open this post in threaded view
|

Re: sql statements

Rick Oliver-3
Before you can read data from any database source, you have to have an ODBC driver for that database type. The SPSS Data Access Pack comes with a variety of drivers for different database types.  Once you have installed the database drivers, you need to define ODBC data sources. In Windows, that's done with the ODBC Data Source Administrator: Control Panel>Administrative Tools>Data Sources (ODBC). You can also access this utility from the SPSS Statistics Database Wizard (File>Open Database).

If you're running in distributed mode or a remote server, the server admin needs to set up these database drivers on the server.

You can use the Database Wizard to generate some basic SELECT statements with various JOIN, FROM, and WHERE clauses. You can then paste the generated syntax and modify it as needed. The SQL generated by the wizard should be valid for the selected database.


Rick Oliver
Senior Information Developer
IBM Business Analytics (SPSS)
E-mail: [hidden email]
Phone: 312.893.4922 | T/L: 206-4922




From:        Rodrigo Briceño <[hidden email]>
To:        [hidden email]
Date:        01/19/2012 08:48 AM
Subject:        Re: sql statements
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Thanks Rick. I do not have enough knowledge about drivers and database
management, so I need to ask to the person who installed SPSS. In
order to ask the proper question to him, can you explain me a little
bit how to identify which database driver my spss is using?

Thanks for your help!

2012/1/18 Rick Oliver <[hidden email]>:
> The acceptable SQL SELECT syntax is database-dependent. It's not a matter of
> what SPSS accepts; it's a matter of what the database driver accepts.
>
>
> Rick Oliver
> Senior Information Developer
> IBM Business Analytics (SPSS)
> E-mail: [hidden email]
> Phone: 312.893.4922 | T/L: 206-4922
>
>
>
> From:        Rodrigo Briceño <[hidden email]>
> To:        [hidden email]
> Date:        01/18/2012 09:51 PM
> Subject:        sql statements
> Sent by:        "SPSSX(r) Discussion" <[hidden email]>
> ________________________________
>
>
>
> Dear SPSS Listers. Is there a way to get a list of SQL statements that
> can be used to read tables with ODBC functionality. I am reading data
> from SQL tables, but I would like to be sure with kind of SQL
> statements can I use in order to make filters and other operations.
>
> THanks!
>
> --
> Rodrigo Briceño
> Economist
> [hidden email]
> MSN: [hidden email]
> SKYPE: rbriceno1087
>
> =====================
> To manage your subscription to SPSSX-L, send a message to
> [hidden email] (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
>
>



--
Rodrigo Briceño
Economist
[hidden email]
MSN: [hidden email]
SKYPE: rbriceno1087

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (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