MajP
You've got your good things, and you've got mine.
- Local time
- Yesterday, 22:46
- Joined
- May 21, 2018
- Messages
- 9,503
There are some really good sql formatters out there and we should point users to using them when posting sql strings. So recently a user posted this and asked for help
and posted this. This is just an example and not to criticize the OP.
INSERT INTO BatchedFilesTable ( [Nz(PensionNo)], [Nz(SurnameInitials)], [Nz(ChildID)], [Nz(Type)], [Nz(TDate)], [Nz(ResCode)], [Nz(District)], [Nz(LocalOffice)], [Nz(BRMBarcode)], [Nz(BatchNo)], [Nz(UserID)] )
SELECT Forms!frmFileCapture!TxtPension AS Expr1, Forms!frmFileCapture!TxtSurname AS Expr2, Forms!frmFileCapture!TxtChildID AS Expr3, Forms!frmFileCapture!TxtType AS Expr4, Forms!frmFileCapture!TxtDate AS Expr5, Forms!frmFileCapture!TxtRescode AS Expr6, Forms!frmFileCapture!TxtDistrict AS Expr7, Forms!frmFileCapture!TxtLocalOffice AS Expr8, [Forms]![frmFileCapture]![TxtBRMBarcodeNo] AS Expr9, [Forms]![frmFileCapture]![TxtBatchNo] AS Expr10, [Forms]![frmFileCapture]![TxtUserID] AS Expr11
I cannot read in that format but if I use my favorite http://www.dpriver.com/pp/sqlformat.htm I drop it in and get this
and posted this. This is just an example and not to criticize the OP.
INSERT INTO BatchedFilesTable ( [Nz(PensionNo)], [Nz(SurnameInitials)], [Nz(ChildID)], [Nz(Type)], [Nz(TDate)], [Nz(ResCode)], [Nz(District)], [Nz(LocalOffice)], [Nz(BRMBarcode)], [Nz(BatchNo)], [Nz(UserID)] )
SELECT Forms!frmFileCapture!TxtPension AS Expr1, Forms!frmFileCapture!TxtSurname AS Expr2, Forms!frmFileCapture!TxtChildID AS Expr3, Forms!frmFileCapture!TxtType AS Expr4, Forms!frmFileCapture!TxtDate AS Expr5, Forms!frmFileCapture!TxtRescode AS Expr6, Forms!frmFileCapture!TxtDistrict AS Expr7, Forms!frmFileCapture!TxtLocalOffice AS Expr8, [Forms]![frmFileCapture]![TxtBRMBarcodeNo] AS Expr9, [Forms]![frmFileCapture]![TxtBatchNo] AS Expr10, [Forms]![frmFileCapture]![TxtUserID] AS Expr11
I cannot read in that format but if I use my favorite http://www.dpriver.com/pp/sqlformat.htm I drop it in and get this
Code:
INSERT INTO batchedfilestable
([nz(pensionno)],
[nz(surnameinitials)],
[nz(childid)],
[nz(type)],
[nz(tdate)],
[nz(rescode)],
[nz(district)],
[nz(localoffice)],
[nz(brmbarcode)],
[nz(batchno)],
[nz(userid)])
SELECT forms ! frmfilecapture ! txtpension AS Expr1,
forms ! frmfilecapture ! txtsurname AS Expr2,
forms ! frmfilecapture ! txtchildid AS Expr3,
forms ! frmfilecapture ! txttype AS Expr4,
forms ! frmfilecapture ! txtdate AS Expr5,
forms ! frmfilecapture ! txtrescode AS Expr6,
forms ! frmfilecapture ! txtdistrict AS Expr7,
forms ! frmfilecapture ! txtlocaloffice AS Expr8,
[forms] ! [frmfilecapture] ! [txtbrmbarcodeno] AS Expr9,
[forms] ! [frmfilecapture] ! [txtbatchno] AS Expr10,
[forms] ! [frmfilecapture] ! [txtuserid] AS Expr11