471,092 Members | 1,158 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,092 software developers and data experts.

SQL Sub Queries?

Hi,

I am using the ODBC connection with Sage Accounts to print barcode labels. It is very slow and I want to try and speed up the sql I am using. The database has over 6000 items, but only 3000 are in use at the moment (cannot delete them). I have a variable "QTY_REORDER_LEVEL" which when 0 means its not in use.

I was hoping I could somehow run through the db stripping old out first and then doing the barcode search.

Would this make things faster? And if so/or not, could you give me some ideas.

My current sql string is:

Expand|Select|Wrap|Line Numbers
  1. SELECT DESCRIPTION, SALES_PRICE, TAX_CODE
  2. FROM STOCK
  3. WHERE QTY_REORDER_LEVEL <> '0' AND STOCK_CODE = :VarBarcode
  4.  
Thanks,
Paul.
Sep 29 '07 #1
2 1109
azimmer
200 Expert 100+
Hi,

I am using the ODBC connection with Sage Accounts to print barcode labels. It is very slow and I want to try and speed up the sql I am using. The database has over 6000 items, but only 3000 are in use at the moment (cannot delete them). I have a variable "QTY_REORDER_LEVEL" which when 0 means its not in use.

I was hoping I could somehow run through the db stripping old out first and then doing the barcode search.

Would this make things faster? And if so/or not, could you give me some ideas.

My current sql string is:

Expand|Select|Wrap|Line Numbers
  1. SELECT DESCRIPTION, SALES_PRICE, TAX_CODE
  2. FROM STOCK
  3. WHERE QTY_REORDER_LEVEL <> '0' AND STOCK_CODE = :VarBarcode
  4.  
Thanks,
Paul.
Not necessarily. I suggest you put indices on QTY_REORDER_LEVEL and STOCK_CODE.
Sep 29 '07 #2
Hi,

Thanks for your advice, I am going to go and try it.

Paul.
Oct 2 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

9 posts views Thread by Dom Boyce | last post: by
reply views Thread by MHenry | last post: by
44 posts views Thread by Greg Strong | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.