View Single Post

   
  #1 (permalink)  
Old 02-26-2008, 03:56 PM
MK Randall
 
Posts: n/a
Default NEED HELP - Query Conversion

We're losing a Sybase datasource and need to pull from an identical DB2
database until the SQL Server becomes available later on this year. If
someone could read through the query and let me know what is wrong with it,
your assistance would be greatly appreciated. The error message I receive
is(this comes from SQL):

Package Error

Error Source: Microsoft OLE DB Provider for ODBC Drivers

Error Description: [IBM][CLI Driver][DB2] SQL0104N An unexpected token "="
was found following "". Expected tokens may include "(+-?:CASE CAST USER
<FLOAT> CURRENT <DECIMAL> <INTEGER>". SQLSTATE=42601

The lines with "=" in them include
---

Case When (AICR.VWFRSCT.MMM_GRD_SEQ Between '160' And '380' ) and
AICR.VWFRSCT.MMM_HOME_COUNTRY = 'US'
---

WHERE
AICR.VWFRSCT.ORG_CODE is not Null and
AICR.VWFRSCT.DIV_CODE *=AICR.VTGROUP_DIV.DIV_CODE and
AICR.VWFRSCT.MARKET_CODE *=AICR.VTMARKET_GROUP.MARKET_CODE and
AICR.VWFRSCT.BUSINESS_UNIT *=AICR.VTBUSS_UNIT.BUSS_UNIT_CODE

---

TIA,

Michael Randall
mrandall@mmm.com


Reply With Quote