I want to treat the file like a table in either an ODBC or SYBASE_OC stage. I have imported the file using Import..Sequential File Definitions and defined the 4 columns accordingly.
I want to select data from the file and output it to another file - to keep things simple I am just trying to write out the exact same file until I get things working.
On the output tab of the SYBASE_OC stage I added file.txt to the Table Names: box and loaded the file definition on the columns tab.
So the simple query looks like this: SELECT series_id,ptfo_cd,curr_cd,catn_cd FROM file.txt;
When I hit View Data I get the following message:
GetMeasurmentData1..Sybase_OC_0: ct_results has fetched an error
SQL statement: SELECT series_id,ptfo_cd,curr_cd,catn_cd FROM series.txt
GetMeasurmentData1..Sybase_OC_0.DSLink1: DSP.Open GCI $DSP.Open error -100.
I get the same error if I select "use column derivation field".
I tried the same test on the ODBC stage and the error returned when I hit View Data was:
GetMeasurmentData1..ODBC_3.DSLink4: DSD.BCIOpenR call to SQLTables failed.
SQLSTATE=HY000, DBMS.CODE=2762
[DataStage][SQL Client][ODBC][DataDirect][ODBC Sybase Wire Protocol driver][SQL Server]The 'CREATE TABLE' command is not allowed within a multi-statement transaction in the 'tempdb' database.
This is regardless of whatever transaction handling I am using - the error message doesn't seem to fit the query that I am running.
Am I incorrect in the way that I am trying to use a sequential file as a table ?
If I am then how can I use a sequential file as an input table or do I use a different type of file ?
Ideally I want to join this table to other tables actually on a Sybase server.
As always, any help is appreciated
![Smile :)](./images/smilies/icon_smile.gif)