When you are in the View Editor, under the Text tab, in either field (columns or select stmt area) there seems to be some sort of limit at 1024 characters on one line. I’ll just talk about the select stmt field. Let’s say you have a Select statement where everything is on one line, and the line is over 1024 characters. Open the attachment to this message, Ctrl-A the statement and copy it. Then paste it into the View Editor (do not put a hard return at the end). Then press Ctrl-A to select it all. You will see that your highlight will only go up to the middle of the atp_calendar column – that is 1024 characters. Press Ctrl-C and then paste it back into notepad, and you will see that you don’t have everything you started with.
Trick – Now do the same thing again, but put a hard return at the end of the select statement after you paste it into the View Editor. Now Ctrl-A will select it all.
The problem here is, with the long select statement, if you re-format it (ctrl-R), will format everything correctly, but it will also have all the characters after the 1024 mark at the end of the formatted select statement. I hope I was able to convey the problem here. Sometimes it is hard to explain things in a message.
long_sql.zip (533 Bytes)