Troubleshooting
Problem
I am trying to select records from my database based on date in SPSS for Windows. At the "limit retrieved cases" screen in the Database Wizard, I want to only select cases after a certain date, e.g. 7th July 1999. In versions prior to SPSS 15, help (within the "limit retrieved cases" dialog box) states you can use the following: "Date literals should be specified by using the general form: {d yyyy-mm-dd}." I do this and for this date I use {d 1999-07-07} I then go through the rest of the wizard. Whether I click 'OK' on the final screen to import the data or paste the data and run that, I get the following error: >Warning. Command name: GET DATA >SQLExecDirect failed :[Microsoft][ODBC xxxxx Driver] Syntax error (missing operator) in query expression '(date1 > d 1999-07-07} )' or a similar incorrect syntax error depending on my database driver. If I go back to the wizard and put quote marks around my date selection, e.g. {d '1999-07-07'} the data imports with no problems. Is this a mistake in the SPSS documentation?
Log InLog in to view more of this document
Historical Number
61649
Was this topic helpful?
Document Information
Modified date:
16 April 2020
UID
swg21479153