PT ODBC sql statement list issue

  • Thread starter perryclisbee via AccessMonster.com
  • Start date
P

perryclisbee via AccessMonster.com

I have a sql statment that is calling for data on a different server, based
on certain numeric values I have on a list in the statement. I have 4000
values on the list, and since an error popped up stating that I could not
have more than 1000 values in a list, I broke them up by using an IN (values..
) for the first list, and a AND IN (values) for the remaining lists right
after it.

Can this be done? I did get an error that the sql command was not properly
ended (#933).
Can a list be broken up into smaller parts, so as to be included on one
statement?

Thanks,
Perry
 
S

Smartin

perryclisbee said:
I have a sql statment that is calling for data on a different server, based
on certain numeric values I have on a list in the statement. I have 4000
values on the list, and since an error popped up stating that I could not
have more than 1000 values in a list, I broke them up by using an IN (values..
.) for the first list, and a AND IN (values) for the remaining lists right
after it.

Can this be done? I did get an error that the sql command was not properly
ended (#933).
Can a list be broken up into smaller parts, so as to be included on one
statement?

Thanks,
Perry

No need for a huge messy list in your SQL. If I understand you correctly
just make a separate table of your list elements and write a query that
either joins to the list table or does a subquery.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top