|
I've used the database wizard with version 14.0 and have recently upgraded
to 17.0.1 and am trying to query a new database. I'm able to retrieve the data through MS Query without a problem, but get the following message when I try to execute through the DB Wizard: DATASET ACTIVATE DataSet1. DATASET CLOSE DataSet2. GET DATA /TYPE=ODBC /CONNECT='DSN=TXMS;UID=jalexandre;PWD="i/v+H"B&z''J#u;APP=SPSS Statistics;WSID=JALEXANDER-L;DATABASE=TXMS_Newport;QuotedId=no;AnsiNPW=no' /SQL='SELECT T0."entity_type_code", T0."entity_id", T0."timestamp", T0."record_inserted_by_user_stamp", T0."user_stamp", T0."record_inserted_datetime", T0."record_modified_datetime", T1."pers_entity_id", T1."pers_entity_type_code", T1."event_date", '+ 'T1."marital_status_code", T1."student_status_code", T1."religion_code", T1."resource_entity_id", T1."resource_entity_type_code", T1."interpreter_reqd_code", T1."hispanic_code", T1."gender_code", T1."ssn_num", T1."birth_date", T1."pers_memo", '+ 'T1."last_name", T1."first_name", T1."middle_name", T1."title_txt", T1."suffix_txt", T1."death_date", T1."deceased_flg", T1."school_name", T1."privacy_level_num", T1."eye_color_code", T1."hair_color_code", T1."weight_num", '+ 'T1."weight_unit_code_type_code", T1."weight_unit_code", T1."height_num", T1."height_unit_code_type_code", T1."height_unit_code", T1."metaphone_num", T1."pers_img", T1."timestamp" AS "timestamp1", T1."record_inserted_by_user_stamp" AS '+ '"record_inserted_by_user_stamp1", T1."user_stamp" AS "user_stamp1", T1."record_inserted_datetime" AS "record_inserted_datetime1", T1."record_modified_datetime" AS "record_modified_datetime1" FROM "dbo"."tblentity" T0, "dbo"."tblperson" T1 WHERE '+ 'T0."entity_id" = T1."pers_entity_id" and T0."entity_id" = T1."pers_entity_id"' /ASSUMEDSTRWIDTH=255. >Warning. Command name: GET DATA >SQLExecDirect failed :[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near 'entity_type_code'. CACHE. EXECUTE. >Error # 105. Command name: EXECUTE >This command is not valid before a working file has been defined. >This command not executed. DATASET NAME DataSet3 WINDOW=FRONT. DATASET ACTIVATE DataSet3. DATASET CLOSE DataSet1. Any thoughts or help would be greatly appreciated. Thanks in advance. Regards, Jason W. Alexandre MA, MS Vice President of Organizational Quality & Performance Child & Family 24 School Street Newport, RI 02840 email: [hidden email] website: www.childandfamilyri.com ===================== 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 |
|
This is just a shot in the dark, but try changing all the single quotes in the SQL subcommand to double quotes, and vice-versa. Alternatively, try changing the single quotes at the beginning and end of each line to the left-to-right accent character (on the same key as the tilde on my keyboard).
-----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Jason Alexandre Sent: Tuesday, January 27, 2009 7:51 AM To: [hidden email] Subject: Help with Database Wizard I've used the database wizard with version 14.0 and have recently upgraded to 17.0.1 and am trying to query a new database. I'm able to retrieve the data through MS Query without a problem, but get the following message when I try to execute through the DB Wizard: DATASET ACTIVATE DataSet1. DATASET CLOSE DataSet2. GET DATA /TYPE=ODBC /CONNECT='DSN=TXMS;UID=jalexandre;PWD="i/v+H"B&z''J#u;APP=SPSS Statistics;WSID=JALEXANDER-L;DATABASE=TXMS_Newport;QuotedId=no;AnsiNPW=no' /SQL='SELECT T0."entity_type_code", T0."entity_id", T0."timestamp", T0."record_inserted_by_user_stamp", T0."user_stamp", T0."record_inserted_datetime", T0."record_modified_datetime", T1."pers_entity_id", T1."pers_entity_type_code", T1."event_date", '+ 'T1."marital_status_code", T1."student_status_code", T1."religion_code", T1."resource_entity_id", T1."resource_entity_type_code", T1."interpreter_reqd_code", T1."hispanic_code", T1."gender_code", T1."ssn_num", T1."birth_date", T1."pers_memo", '+ 'T1."last_name", T1."first_name", T1."middle_name", T1."title_txt", T1."suffix_txt", T1."death_date", T1."deceased_flg", T1."school_name", T1."privacy_level_num", T1."eye_color_code", T1."hair_color_code", T1."weight_num", '+ 'T1."weight_unit_code_type_code", T1."weight_unit_code", T1."height_num", T1."height_unit_code_type_code", T1."height_unit_code", T1."metaphone_num", T1."pers_img", T1."timestamp" AS "timestamp1", T1."record_inserted_by_user_stamp" AS '+ '"record_inserted_by_user_stamp1", T1."user_stamp" AS "user_stamp1", T1."record_inserted_datetime" AS "record_inserted_datetime1", T1."record_modified_datetime" AS "record_modified_datetime1" FROM "dbo"."tblentity" T0, "dbo"."tblperson" T1 WHERE '+ 'T0."entity_id" = T1."pers_entity_id" and T0."entity_id" = T1."pers_entity_id"' /ASSUMEDSTRWIDTH=255. >Warning. Command name: GET DATA >SQLExecDirect failed :[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near 'entity_type_code'. CACHE. EXECUTE. >Error # 105. Command name: EXECUTE >This command is not valid before a working file has been defined. >This command not executed. DATASET NAME DataSet3 WINDOW=FRONT. DATASET ACTIVATE DataSet3. DATASET CLOSE DataSet1. Any thoughts or help would be greatly appreciated. Thanks in advance. Regards, Jason W. Alexandre MA, MS Vice President of Organizational Quality & Performance Child & Family 24 School Street Newport, RI 02840 email: [hidden email] website: www.childandfamilyri.com ===================== 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 |
|
In reply to this post by Jason Alexandre
Thanks to everyone for their suggestions. It seems that by removing the
double quotes in the /SQL command line, the query executes. Thanks Jason S. ===================== 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 |
| Free forum by Nabble | Edit this page |
