I only need 14 variables from a very large SPSS database. I want to create a new databased that only includes the selected 14 variables. I have done this in the past but I can't remember how I did it. Any help would be greatly appreciated.
you can save a new data-set with selected variables whenever you save your data-set as a new copy. You just need to select the variables that you want by using the "variable" option on the save-file-window.
For example:
Open your raw-dataset in SPSS and go:
Data->Save As...-> enter a name for your copy -> klick the "Variables..." option and de-select all Variables that you don't need. You can deselect all and then select the 14 variables that you need in the new set.
You could use a syntax and use it again. With the subcommand KEEP you can also reorder you variables (SPSS used to have the command ORDER VARIABLES, but has become defunct).
SAVE OUTFILE='D:\map\dataset.sav'
/KEEP = VAR01 TO VARn
/COMPRESSED.
@Fadhil Abdulabbas Abidi , do not use your method as it is not reproducible and certainly does not comply to ISO standards for research. You should always create a syntax for the data management and analyses you run. You could paste the method Alexander Steiger uses, but if you have a large data set it can create a unreadable syntax.
The subcommand COMPRESSED ensure the data set is compressed in size. If the data set is very large save it as .zsav. It uses a stronger compression rate.
Nicholas J. Beutell , do you really mean to a database, like into ACCESS? It can be done, but you might want to use from the menu EXPORT to ACCESS. For an export to a database, you will need an ODBC connection for that specific database (ACCESS, ORACLE). SPSS will create an SQL statement to export the data. I use the menu from SPSS to create a basic template and will change it to my wishes.
Hi Alexander, Fadhil, and Peter - Thanks for this helpful feedback! Yes, this was easily done. In the Data View I selected the variable columns that I wanted, right clicked to Copy with Variable Names, then pasted to the new 14-variable dataset. Your valuable feedback is much appreciated. Best wishes...Nick