Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help - SELECT SQL - COMMAND LINE TOO LONG

Status
Not open for further replies.

Foxtech

Programmer
May 26, 2001
66
0
0
CA
Hi everyone,

I have a lot of columns to select in my SELECT SQL command and I respect the maximum
of characters (2048) by using ; and continue on the next line but I still get that message error
in compilation.

an answer would be very appreciated.

thanks
 
believe that limit can't be overriden

perhaps you could whittle it down via a
series of selects...

select * from maintbl into cursor a
where (some of the criteria)

select * from a where (some more of the criteria)

select * from b where (rest of the criteria)

then, just use the info from b.
 
also, if too many columns you can do 2 selects into different cursors, but have both selects include field(s)
that can link the cursors together.

then, just do a select from the 2 cursors to get your result set (join them on the link fields, of course).
 
The max characters is per sql statement breaking it into separate lines is not going to help you.
 
Thanks a lot,

That what's I did in 2 SELECT and join together with a key. I think that the command line
not allow to do in the same Select. But in this case, it is a limitation of the SQL statement.

It's good to know.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top