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

ODBC SQL Error

Status
Not open for further replies.

Kavius

Programmer
Apr 11, 2002
322
CA
I have a select statement that is failing miserably when I connect through the PVX-ODBC.

I receive the error:
Code:
Invalid Operand for Operator: >=
the sql is:
Code:
select count(*) 
from   SO1_SOEntryHeader gen, 
       SO_04SOHistoryDetail det 
where  gen.SalesOrderNumber = det.SalesOrderNumber and 
       gen.CustomerNumber = 'qqqqqqq' and 
       det.ItemNumber = 'qqqqqqqqqqqqqqq' and 
       gen.SalesOrderDate >= '01-Jan-2003' and 
       gen.SalesOrderDate <= '31-Dec-2003'
I have no ideas what the problem with this sql statement is. I am pretty sure this is a PVX specific error (tested it under SQL Server) but don't really know.

Any help would be apreciated.
_______________________________________
Ignorance is a beautiful thing:
You don't know what you can't do...
 
Try the following:
(1) Remove the <=, and >= and replace with just a > or a <. Does it work? I'm curious if it's having problems with the combo-platter operators of < and =. If it works with just the '>' and '<', try reversing the order of them, so the equal sign comes first == i.e. '=>' and '=<'. I've seen weirded stuff--humor me.

(2) Remove the portion of the select statements referencing the SalesOrderDate field altogther. MAS90 uses a compacted date -- and I'm not sure if something with that is causing you a problem or not. At this point, I just want to isolate where the problem is.

(3) I'm curious to the use of the PVX ODBC--MAS90 workstation setup installs a SOTAMAS90 dsn. Any reason for the PVX ODBC?

 
I will haven't yet tried it, but I figure I should point out that I am not using the PVX ODBC. I don't know what I was thinking but I was really tired when I wrote that. I am using the SOTAMAS90 dsn.

Ugghh... What a week.[thumbsdown] Oh, and its only Wednesday. _______________________________________
Ignorance is a beautiful thing:
You don't know what you can't do...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top