Hi Experts - some help please with SQL syntax to select records for a new table.
In broken code : If IsDate TABLE1 [_Date] and TABLE1 [_Reason] contains string "XYZ"
then insert TABLE1 [_KeyNr and _Date] into TABLE2 [_KeyNr and _Date]
I got stuck about here:
SQL = ""
SQL = "Insert into TABLE2 ( _KeyNr, _Date )"
SQL = SQL & " select TABLE1.KeyNr, TABLE1.Date "
SQL = SQL & "when ???? IsDateTABLE1.date and ?????Instr TABLE1.Reason = "XYZ"
CURDB.Execute SQL
DoEvents
Screen.MousePointer = 0
On Error GoTo 0
Complete code please.
Many thanks
Peter
Start Free Trial