sCommand = "create table Recon_Info (" +; "id int IDENTITY NOT NULL, " +; "media_order_detail_id int NOT NULL, " +; "user_name CHAR(40) NOT NULL, " +; "invoice_no CHAR(40) NOT NULL, " +; "batch_no CHAR(8) NOT NULL, " +; "status CHAR(1) NOT NULL, " +; "done_date_time datetime NOT NULL, " +; "invoice_date datetime NOT NULL, " +; "due_date datetime NOT NULL, " +; "from_date datetime NOT NULL, " +; "to_date datetime NOT NULL, " +; "invoice_notes char(128), " +; "adjustment_amt float(8) " +; ")"Here's the INSERT command:
sCommand = "insert into Recon_Info (" +; "media_order_detail_id, " +; "user_name, " +; "invoice_no, " +; "batch_no, " +; "status," +; "done_date_time, " +; "invoice_date, " +; "due_date, " +; "from_date, " +; "to_date , " +; "invoice_notes, " +; "adjustment_amt" + ; ") values (" +; TRANSFORM(Commits.DtId) + ", " +; Commits.UserId + ", " +; Commits.InvoiceId + ", " +; Commits.BatchId + ", " +; IIF(Commits.Scanned, 'P', Commits.Status) + ", " +; cDoneDate + ", " +; cInvDate + ", " +; cDueDate + ", " +; cFromDate + ", " +; cToDate + ", " +; Commits.Notes + ", " +; TRANSFORM(Commits.AdjAmt) + ", " +; ")">The SQL Server Books Online (BOL) are installed with SQL Server clients tools. You can download the latest version from http://www.microsoft.com/downloads/details.aspx?FamilyID=a6f79cb1-a420-445f-8a4b-bd77a7da194b&DisplayLang=en