navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

SQL Statement is Too Long

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> SQL Statement is Too Long
Page: [1]
 
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.

(in reply to pd_it_guy)
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

(in reply to pd_it_guy)
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.

(in reply to pd_it_guy)
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...

(in reply to rdouglass)
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

(in reply to pd_it_guy)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> SQL Statement is Too Long
Page: [1]
Jump to: 1





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