I am using ODBC stage and trying to write to an excel file. The DSN is mapped to excel and the worksheet chosen as the table. But when trying to write to the excel
Event #:504
Timestamp:8/12/2004 3:58:15 PM
Event type:Warning
Message:
Accountxls..ODBC_4.Lnk_Account: DSD.BCIOpenR call to SQLExecDirect failed.
Statement was:SELECT HEADER, VERSION, ACCT_NUMBER accountloader
SQLSTATE=S1004, DBMS.CODE=0
[DataStage][SQL Client]An unsupported SQL data type was encountered
all the three columns are varchar.
what i do not understand is
1. why is the DS director giving me a select statement when the SQL stmt. is INSERT INTO accountloader(HEADER, VERSION, ACCT_NUMBER) VALUES (?,?,?)
2. "An unsupported SQL data type was encountered". Is this because the datatype i mentioned was Varchar or is it because the data was not compatible with the type.
thanks
Sonia
writing into excel
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 122
- Joined: Mon Jul 05, 2004 1:33 pm
- Location: MA
-
- Participant
- Posts: 122
- Joined: Mon Jul 05, 2004 1:33 pm
- Location: MA
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 122
- Joined: Mon Jul 05, 2004 1:33 pm
- Location: MA
Finally I was able to write to excel. :D
But to drop table/worksheet before load or clear the table/worksheet before load does not seems to be working. It throws errors like
THANKS A LOT
But to drop table/worksheet before load or clear the table/worksheet before load does not seems to be working. It throws errors like
- DSD.BCIOpenW call to OCONV failed. Statement: DROP TABLE accountloader
Deleting data in a linked table is not supported by this ISAM
THANKS A LOT
Hi Sonia,
You can also use a Exec sh or Exec dos commands and give the pamareter as "rm file.xls" this will run before the your job runs and deletes that file using OS.
HTH
Thanks
Neena
You can also use a Exec sh or Exec dos commands and give the pamareter as "rm file.xls" this will run before the your job runs and deletes that file using OS.
HTH
Thanks
Neena
Last edited by neena on Fri Aug 13, 2004 11:18 am, edited 1 time in total.
-
- Participant
- Posts: 122
- Joined: Mon Jul 05, 2004 1:33 pm
- Location: MA
Hi Neena,
My understanding of using Excel as a source and/or target was that the DSN points to the WorkBook (.xls file) as it does to a database and each sheet with the workbook is considered as a table.
In short
Database = Workbook (File.xls)
Table = Worksheet (sheet1)
Now If i remove the .xls file then I would get a error while the DSN tries to connect to the .xls file.
Do correct me if I am wrong
Thanks
Sonia
My understanding of using Excel as a source and/or target was that the DSN points to the WorkBook (.xls file) as it does to a database and each sheet with the workbook is considered as a table.
In short
Database = Workbook (File.xls)
Table = Worksheet (sheet1)
Now If i remove the .xls file then I would get a error while the DSN tries to connect to the .xls file.
Do correct me if I am wrong
Thanks
Sonia