Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Insert Problem
Message
De
10/02/2006 11:26:31
Jim Winter
Jim Winter Consulting
Hinesburg, Vermont, États-Unis
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
01095446
Message ID:
01095474
Vues:
10
Thanks again Sergey.

>Make your life easier, use textmerge
>TEXT TO lcSql NOSHOW PRETEXT 7
>Insert InOrder_Live..tblLabel
>      (lab_key,lab_name,lev_level,lab_attention,lab_department,
>      lab_deliver_to,lab_street,lab_city,lab_city_line,sta_state_code,
>      lab_postal_code,cou_country_code,lab_contry_line,lab_creation_date,
>      cnc_currency_code,lab_alt_number,lab_e_mail,typ_customer_type,
>      lab_entered_by,lan_language_code,lab_revision_date,lab_san,
>      lab_parent_label,lab_reminder,lab_san_suffix, cus_sold_to_customer,
>      lab_preferrred_comm,lab_first_name,lab_middle_initial,lab_last_name,
>      lab_name_suffix,npr_name_prefix,own_owner_code,lab_email_format,
>      lab_delivery_type) VALUES
>      select * from inorder_play..tblLabel where not (Lab_Name='to be deleted' or lab_key < 5003)
>
>ENDTEXT
>lnResult = SQLEXEC(nh1, lcSql)
>
>
>>Using the following syntax from the command window
>>
select * from inorder_play..tblLabel where not (Lab_Name='to be deleted' or lab_key < 5003)")
returns a valid cursor but the following insert statement
>>
? SQLEXEC(nh1,"Insert InOrder_Live..tblLabel ;
>>      (lab_key,lab_name,lev_level,lab_attention,lab_department, ;
>>      lab_deliver_to,lab_street,lab_city,lab_city_line,sta_state_code, ;
>>      lab_postal_code,cou_country_code,lab_contry_line,lab_creation_date, ;
>>      cnc_currency_code,lab_alt_number,lab_e_mail,typ_customer_type, ;
>>      lab_entered_by,lan_language_code,lab_revision_date,lab_san, ;
>>      lab_parent_label,lab_reminder,lab_san_suffix, cus_sold_to_customer, ;
>>      lab_preferrred_comm,lab_first_name,lab_middle_initial,lab_last_name, ;
>>      lab_name_suffix,npr_name_prefix,own_owner_code,lab_email_format, ;
>>      lab_delivery_type) VALUES ;
>>      select * from inorder_play..tblLabel where not (Lab_Name='to be deleted' or lab_key < 5003)")
produces the error message, "Command contains unrecognized phrase/keyword." and the command is not executed.
>>
>>Can someone spot the reason?
>>
>>TIA,
Jim
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform