Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
INSERT INTO statement
Message
De
20/09/2000 21:35:52
 
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00417975
Message ID:
00418825
Vues:
21
>>Sorry to mislead everyone. I actually cut short the SQL statement to
>>make it looks simple, but I have left out the 2 parenthesis.
>>My actual statement is as follows:
>>
>>cnn1.Execute "INSERT INTO DTCList(IndexNo, NRIC, CustName, DTCDate, Birthday, PrintDate) " & _
>>"VALUES('" & Trim(!IndexNo) & "', '" & Trim(!NRIC) & "', '" & Trim(!CustName) & "', #" & Trim(CStr(!DTCDate)) & "# , #" & Trim(CStr(!Birthday)) & "# , #" & Trim(CStr(Date)) & "# ) " & _
>>"WHERE DTCList.IndexNo <> '" & Trim(!IndexNo) & "' AND DTCList.CaseClosed"
>>
>>I still get the missing semicolon(;) error, pls advise, thanks a lot.
>
>Wait a minute! Why do you have a Where clause in an Insert Statement?

The WHERE clause is the conditions that I would like to check before
writing a record into the Table. If the conditions are met, then would
I want a record to be inserted. Or any other ways to handle such case?
Pls provide your expertise advise, thanks.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform