rarogersonkf
Programmer
I am creating an SQL statement by concatenation as follows:
Dim DataLib As String
Dim Stmt As String
DataLib = "Mylib"
Stmt = ""
Stmt = Stmt & "SELECT USRDPT, PRIOR, CONCAT(DESC1, DESC2) AS DESC, "
Stmt = Stmt & " CONCAT(A.STATUS, CONCAT(' - ',"
Stmt = Stmt & " (SELECT PARD33 FROM " + DataLib + ".KFP33C WHERE TYPE33 = 'STAT' AND SEAK33 = A.STATUS))) AS STATUS, "
Stmt = Stmt & " PROJ#, PHASE#, PEDAT, AEDAT, UTSDAT, PTOTMD, ATMDAY"
Stmt = Stmt & " FROM " + DataLib + ".KFP34 A"
When I put the code in debug Stmt is built correctly until the final line (the from clause). This line is not appended.
Is there a restriction of the length of the string Stmt?
Thanks in advance for your help.
Rob
Dim DataLib As String
Dim Stmt As String
DataLib = "Mylib"
Stmt = ""
Stmt = Stmt & "SELECT USRDPT, PRIOR, CONCAT(DESC1, DESC2) AS DESC, "
Stmt = Stmt & " CONCAT(A.STATUS, CONCAT(' - ',"
Stmt = Stmt & " (SELECT PARD33 FROM " + DataLib + ".KFP33C WHERE TYPE33 = 'STAT' AND SEAK33 = A.STATUS))) AS STATUS, "
Stmt = Stmt & " PROJ#, PHASE#, PEDAT, AEDAT, UTSDAT, PTOTMD, ATMDAY"
Stmt = Stmt & " FROM " + DataLib + ".KFP34 A"
When I put the code in debug Stmt is built correctly until the final line (the from clause). This line is not appended.
Is there a restriction of the length of the string Stmt?
Thanks in advance for your help.
Rob