Indexing tables exported to Access

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

Indexing tables exported to Access

Biblin, Janet, BHCS
Is there a way via code to create an index on a table that you are exporting to Microsoft Access?
We have created a large table with SPSS syntax and need it to end up in the Access DB with an index.
Is there any way to do this via syntax?

This is the export code I am currently using

save translate /TYPE=ODBC /CONNECT=
 'DSN=MS Access Database;DBQ=K:\Folders\be\PROD_AB3632_be.mdb;DriverId=25;FIL=MS Access;MaxBuffer'+
 'Size=2048;PageTimeout=5;'
 /table = 'INSYSTforAB3632' /MAP/REPLACE
 .
CACHE.


Janet
Alameda County Behavioral Health Care Services

====================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: Indexing tables exported to Access

Peck, Jon
The SAVE TRANSLATE command has a SQL subcommand that you can use to do this.  Here is the help for it.

Each SQL statement must be enclosed in quotes.

* You can use multiple lines for a single SQL statement by using multiple quoted strings connected with plus signs (the standard string concatenation symbol).

* Each quoted line cannot exceed 256 characters.

* Multiple SQL statements can be included by using multiple SQL subcommands.

* Table and field specifications in SQL statements refer to tables and fields available in the database, not datasets and variables available in the SPSS Statistics session (although in many cases the names may be the same).

* Regardless of the position of the SQL subcommand, the SQL statements are executed last, after all other actions executed by the SAVE TRANSLATE command.


HTH,
Jon Peck

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Biblin, Janet, BHCS
Sent: Wednesday, October 22, 2008 12:57 PM
To: [hidden email]
Subject: [SPSSX-L] Indexing tables exported to Access

Is there a way via code to create an index on a table that you are exporting to Microsoft Access?
We have created a large table with SPSS syntax and need it to end up in the Access DB with an index.
Is there any way to do this via syntax?

This is the export code I am currently using

save translate /TYPE=ODBC /CONNECT=
 'DSN=MS Access Database;DBQ=K:\Folders\be\PROD_AB3632_be.mdb;DriverId=25;FIL=MS Access;MaxBuffer'+
 'Size=2048;PageTimeout=5;'
 /table = 'INSYSTforAB3632' /MAP/REPLACE
 .
CACHE.


Janet
Alameda County Behavioral Health Care Services

=======
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

=====================
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