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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SELECT STATEMENT DEBUGGING - HELP

Status
Not open for further replies.

kingjjx

Programmer
Joined
Sep 18, 2001
Messages
181
Location
US
Can someone please tell me if is there anything wrong with this select statement. thanks


<cfquery name=&quot;Info&quot; datasource=&quot;EncoreCompanyD&quot;>

SELECT dbo.InvMaster.StockCode, dbo.InvMaster.Description, dbo.InvMaster.ProductClass, dbo.InvPrice.StockCode, dbo.InvPrice.PriceCode, dbo.InvPrice.SellingPrice, dbo.InvMaster.UserField1, dbo.InvMaster.UserField3, dbo.InvMaster.UserField4
FROM dbo.InvMaster, dbo.InvPrice
WHERE (dbo.InvMaster.StockCode = dbo.InvPrice.Stockcode) AND (dbo.InvMaster.ProductClass = 'KITS') AND (dbo.InvPrice.PriceCode = 'R') OR (dbo.InvMaster.ProductClass = 'PCMR')
</CFQUERY>
 
ok .. i tried playing around with the code above. the problem here is .. in my WHERE clause. If in only put
WHERE invmaster.productclass='KITS' AND invprice.stockcode = invmaster.stockcode

this works fine .. but when i add more conditionals such as the OR invmaster='PCMR' .. the query stalls.

any advice anyone ?
 
figured out the bug ... forget this thread.
sorry s-)
 
You may want to post the solution to your problem as well. This way others who may be having a similar problem can learn from your efforts, especially if they search and find this thread.

Just an idea. I search this board a lot and often find the solutions to problems without having to repost the question.

Mitch Duszynski
Web Developer
Human Kinetics
PO Box 5076, Champaign, IL 61825
Tel: 217-351-5076 x2474 | Fax: 217-351-2674
mitchd@hkusa.com |
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top