I think this simply forces a new line. I suspect when you remove these lines, it is causing the select statement to run together (i.e. MAS.MMDCCDFROM ST.T.BAL ). Try putting a space after MAS.MMDCCD and ST.T.MAS MAS. HTH, Joe
Unconfigured Ad Widget
Collapse
Announcement
Collapse
No announcement yet.
SQL Statement in Excel VBA
Collapse
X
-
SQL Statement in Excel VBA
You can look it up here: http://www.lookuptables.com/ But I think a space after the last quoted string on each line would do the same thing. Without one of those, it looks like your SQL Statement would all run together. Sort of like this: Select Fld1From File1Where Fld1 = 0 Mike
-
SQL Statement in Excel VBA
If you remove those (Chr(13) & "" & Chr(10) and place a space before the " at the end of the previous line it should work. Those characters insert a line feed. If you remove those without inserting the blank space, the lines will be concatenanted with no space like; SELECT BAL.BITNO, BAL.AVAL, BAL.VST, MAS.MMITNO,MAS.MMFUDS, MAS.MMDCCDFROM ST.T.BAL BAL, ST.T.MAS MASWHERE BAL.MBITNO = MAS.MMITNO AND ((BAL.MBAVST>0))
Code
Comment
Comment