I wrote sqls in db_execute query that spans 300 chars or more,i would like to write in three separate lines in editor.How can i split a query into 3 or 4 lines.
Some times i m getting out of range error.Whats That?(It has no ref to prior question)im using WR7.5
First, you can always just press Return and have the line continue on the next line at any logical seperation (like a comma). It will be read as one line until the semi-colon is reached. Don't do it with a string as it will fail without a terminated string.
The other option would be to build the long SQL statement into a string varaible and use substitution for the call:
</font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">s_SQL = "This is the first part ";
s_SQL = s_SQL & "add on the second part ";
s_SQL = s_SQL & "and continue until it is all built";</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">Then use the s_SQL variable instead the traditional string text for the query portion of the db_ statement.
Not sure about the range error as if I remember correctly, there are a couple of range errors that coule mean different things.
Insanity: doing the same thing over and over again and expecting different results