|
You must add the statements with the proper punctuation to work correctly. Any statements you add are inserted into the middle of the SQL statement generated by BST SQL immediately following the 'WHERE' , so you need to have your statements correct and include the appending pipe character at the end of the statement(s). You can add as many lines as you need to the text box.
For example adding this code in the text box prompts yields the following statement generated by BST SQL
'Status = <39>OPEN<39> And' &|
BS_WorkOrder_Recurring{PROP:SQL}=' SELECT ' &| ' BS_WorkOrder_PK, Sys_ID, Received, Due, Start ' &| ' , WIP, Customer_Name, Customer_Initiator, Status, BS_AssignedTo ' &| ' , BS_Duration ' &| ' FROM ' & 'dbo.BS_WorkOrder' & ' ' &| ' WHERE ' &| 'Status = <39>OPEN<39> And' &| ' Due BETWEEN <39>' & Format(BST:MonthStartDay7,@D10-) & ' 00:00:00.00<39> ' &| ' AND <39>'& Format(BST:MonthEndDay7,@D10-) & ' 23:59:59.99<39> ' &| ' ORDER BY Due '
Another example adding this code in the text box prompts yields the following statement generated by BST SQL
' BS_AssignedTo = <39>'& CLIP(BsSchedId4)&'<39> AND '&|
BS_WorkOrder_Recurring{PROP:SQL}=' SELECT ' &| ' BS_WorkOrder_PK, Sys_ID, Received, Due, Start ' &| ' , WIP, Customer_Name, Customer_Initiator, Status, BS_AssignedTo ' &| ' , BS_Duration ' &| ' FROM BS_WorkOrder_Recurring ' &| ' WHERE ' &| ' BS_AssignedTo = <39>'& CLIP(BsSchedId4)&'<39> AND '&| ' WIP >= <39>' & Format(BST:WeekStartDay4,@D10-) & ' 00:00:00.00<39> ' &| ' And WIP < <39>' & Format(BST:WeekStartDay4 + 8,@D10-) & ' 00:00:00.00<39> ' &| ' ORDER BY WIP '
|