http://qs321.pair.com?node_id=1105456


in reply to Re^13: SQL query using elements from array
in thread SQL query using elements from array

The output shown has been reformatted with line breaks, I think the schema is
AuditChrt_ID 1 char 10 AuditChrt_RecordState 2 tinyint AuditDgphAlias_ID 3 char 10 AuditDgphType_ID 4 char 10 Login_ID 5 char 10 AuditChrt_Description 6 varchar 400 AuditChrt_Update 7 bit AuditChrt_RecordID 8 char 10 AuditChrt_TimeStamp 9 datetime AuditChrt_RowGuid 10 uniqueidentifier Patient_ID 11 char 10 AuditChrt_Workstation 12 varchar 40 AuditReason_ID 13 char 10 AuditMedication_ID 1 char 10 AuditMedication_RecordState 2 tinyint AuditDgphAlias_ID 3 char 10 AuditDgphType_ID 4 char 10 Login_ID 5 char 10 Pharmacy_ID 6 char 10 AuditMedication_Description 7 varchar 400 AuditMedication_Update 8 bit AuditMedication_RecordID 9 char 10 AuditMedication_TimeStamp 10 datetime AuditMedication_SendMethod 11 tinyint AuditMedication_RowGuid 12 uniqueidentifier Patient_ID 13 char 10 AuditMedication_Workstation 14 varchar 30
poj

Replies are listed 'Best First'.
Re^15: SQL query using elements from array
by mje (Curate) on Oct 29, 2014 at 17:00 UTC

    Yes, my mistake, sorry, it does in fact look like it is a datetime and a datetime in MS SQL Server is compatible with an ODBC quoted ts.

    However, it appears I've somewhat mislead you. The SQL Server driver I use does accept ODBC timestamp escapes in bound parameters whereas the MS one appears not to. So, if you are using the ODBC escapes with your driver you'd need to concatenate them into your SQL or pass them as plain timestamp strings in a format MS accepts.

      OK, thanks I will try that, once again thank you for all your time and effort!