|
| |
|
|
pd_it_guy
Posts: 94 Joined: 3/4/2008 Status: offline
|
SQL Statement is Too Long - 3/31/2008 13:57:57
Our current SQL, with 3 linked tables (and growing) and lots of data items scrolls way off to the right of the page. It certainly works OK but is unweildy to edit. Breaking it up to multiple lines is apparently something that has to be done exactly right or it simply won't work. I think it needs some odd combination of quotes, ampersands, and underscores but the correct syntax eludes me at the moment. Can anyone enlighten.
|
|
|
|
rdouglass
Posts: 9167 From: Biddeford, ME USA Status: offline
|
RE: SQL Statement is Too Long - 3/31/2008 14:08:13
quote:
scrolls way off to the right of the page. You mean on the code page? How 'bout: mySQL = "SELECT blah, blah FROM....." mySQL = mySQL & "WHERE blah = ...." mySQL = mySQL & "AND ...." Is that what you mean?
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
|
|
pd_it_guy
Posts: 94 Joined: 3/4/2008 Status: offline
|
RE: SQL Statement is Too Long - 3/31/2008 14:13:30
Thanks for the reply. I was thinking, rather than successive definitions of mySqL perhaps something that would break and continue, or otherwise wrap the line. If you just do a hard return it abruptly stops working and goes to error. Should each end be quoted or something?? VB has some routine for breaking up a long string (something like " & _) and starting the next with yet another quote, but it doesnt seem to work here
|
|
|
|
rdouglass
Posts: 9167 From: Biddeford, ME USA Status: offline
|
RE: SQL Statement is Too Long - 3/31/2008 14:21:28
How about each line ending in: " _ (double-quote, space, underscore, return) and the next line beginning with: & " (ampersand, space, double-quote) That will work with VBScript. EDIT. Actually, I know that works with VB.NET and I *think* it's the same with VBScript.
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
|
|
pd_it_guy
Posts: 94 Joined: 3/4/2008 Status: offline
|
RE: SQL Statement is Too Long - 3/31/2008 14:22:23
Stand by a sec and we'll try it...
|
|
|
|
pd_it_guy
Posts: 94 Joined: 3/4/2008 Status: offline
|
RE: SQL Statement is Too Long - 3/31/2008 14:27:33
Success once again! Thanks so much.... Much easier to look at and work with
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|