I use this type of block structure for creating SQL queries throughout my code.
I think it would be really nice to have a type of BLOCK continuation where it is not required to place line continuation characters at the end of each line. Maybe something like a line continuation meta command like #LINE, #ENDLINE.
Maybe some of you have a better way of accomplishing this task.
I have used Sql = Sql & "Add to Sql" in the past but this seems resource wasteful.
Any Ideas???
Sql = " UPDATE" & _
$TBL_TRUCK & _
" SET" & _
" attached_bol = " & ShipRec.BOL & _
" FROM" & _
" (SELECT TOP " & Trim$(Str$(Qty)) & " * FROM" & _
" (SELECT DISTINCT T3.A4GLIdentity FROM" & _
" (SELECT TOP 100 PERCENT FROM" & _
$TBL_TRUCK & _
" LEFT JOIN " & $TBL_CARTON & _
" ON UNIQUE_PALLET_NO = CL_SHIP_ATCHD_CODE" & _
" WHERE CL_SHIP_ORDER_NO = '" & OrderNum & "'" & _
" ORDER BY UNIQUE_PALLET_NO" & _
" ) T3" & _
" ) T2" & _
" ) T1" & _
" WHERE " & $TBL_TRUCK & ".A4GLIdentity = T1.A4GLIdentity"
Thanks,
Peter House
I think it would be really nice to have a type of BLOCK continuation where it is not required to place line continuation characters at the end of each line. Maybe something like a line continuation meta command like #LINE, #ENDLINE.
Maybe some of you have a better way of accomplishing this task.
I have used Sql = Sql & "Add to Sql" in the past but this seems resource wasteful.
Any Ideas???
Sql = " UPDATE" & _
$TBL_TRUCK & _
" SET" & _
" attached_bol = " & ShipRec.BOL & _
" FROM" & _
" (SELECT TOP " & Trim$(Str$(Qty)) & " * FROM" & _
" (SELECT DISTINCT T3.A4GLIdentity FROM" & _
" (SELECT TOP 100 PERCENT FROM" & _
$TBL_TRUCK & _
" LEFT JOIN " & $TBL_CARTON & _
" ON UNIQUE_PALLET_NO = CL_SHIP_ATCHD_CODE" & _
" WHERE CL_SHIP_ORDER_NO = '" & OrderNum & "'" & _
" ORDER BY UNIQUE_PALLET_NO" & _
" ) T3" & _
" ) T2" & _
" ) T1" & _
" WHERE " & $TBL_TRUCK & ".A4GLIdentity = T1.A4GLIdentity"
Thanks,
Peter House
Comment