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

Error in the conversion sql query

Status
Not open for further replies.

edvmat

IS-IT--Management
Jun 25, 2014
2
PL
Hello,
When i click "Preview" on OLE DB Source Editor (SQL QUERY) i see result - all data .
I have error only when i Execute task with query from below ( in oracle i don't have this error , i see correct result).

The error is by converting file formats
(INPUT)
TH.LOCATIONCODE->NVARCHAR2
PROP.KEY->NUMBER

Where is my mistake?

SQL QUERY

SELECT
CAST(PROP.VALUE AS VARCHAR2(80)) Nazwa_lokalizacji
FROM KSTIMBER.TIMBERENTRYHEAD TH
LEFT JOIN KSOFTV3.SYSPROPERTIES PROP
ON CAST((TH.LOCATIONCODE) AS CHAR(80))=CAST(REPLACE(PROP.KEY,'LOCATIONCODE_','') AS CHAR(80)) AND TH.CDU_ID=PROP.CDU_ID

Error below from SSIS..

SSIS package "sql_dw_load_ksoft_wbridge_pz.dtsx" starting.
Information: 0x4004300A at Load records toWBRIDGE, DTS.Pipeline: Validation phase is beginning.
Error: 0xC0202009 at Load records toWBRIDGE, ZAczytywanie z bazy danych dbmx do SSMS 1 [57642]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E14.
An OLE DB record is available. Source: "OraOLEDB" Hresult: 0x80040E14 Description: "ORA-00904: "PROP"."VALUE": invalid identifier".
Error: 0xC004706B at Load records toWBRIDGE, DTS.Pipeline: "component "ZAczytywanie z bazy danych dbmx do SSMS 1" (57642)" failed validation and returned validation status "VS_ISBROKEN".
Error: 0xC004700C at Load records toWBRIDGE, DTS.Pipeline: One or more component failed validation.
Error: 0xC0024107 at Load records toWBRIDGE: There were errors during task validation.
SSIS package "sql_dw_load_ksoft_wbridge_pz.dtsx" finished: Success.
 
 http://files.engineering.com/getfile.aspx?folder=96902a59-5e51-4dfb-bd57-a185b57af88e&file=error.jpg
Perhaps "KEY" is a reserved word in Oracle?

==================================
advanced cognitive capabilities and other marketing buzzwords explained with sarcastic simplicity


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top