vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 |
| ||||
| don't know much, but it has a left outer join in it. *= does not mean anything in DB2. you need to convert it to: from table a left outer join table b on a.pk=b.fk I have not been very thoroughly from your query, but maybe it requires a 'nested left outer join' like: from table a left outer join table b on a.pk=b.fk left outer join table c on a.pk=c.fk hth, dotyet "MK Randall" <mrandall@mmm.com> wrote in message news:<bo6dq4$gl3$1@tuvok3.mmm.com>... > 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 |
| Thread Tools | |
| Display Modes | |
|
|