-
DB Execute - Can't Extract Field Called "Comment"
Hi,
I have a table that include a field called "Comment". If I use a "Select *" all the columns of the table are returned no problem. If I use "Select Comment" I get the following error message:
WARN: Output never initialized because metadata was never retrieved from database and therefore output '1' is invalid
Error Code: brain.node.SqlSelect_ExprStmt.cpp.110
Extracting all the fields of the table takes 39 min. Extracting just the fields I need takes 3 minutes, so I am keen to find an answer on how to specifically extract this field.
I have tried using "Comment", 'Comment', [Comment] but no joy .
Any help on this would be gratefully received!
Thanks
Peter
-
Lavastorm Employee
This is most likely a question you'll have to take up with the database vendor.
1) What type of database is it?
2) try using the AS keyword just as a test:
Code:
Select Comment as MyText
-
Hi,
The "as" doesn't work. It's an Oracle DB.
Cheers
Peter
-
Lavastorm Employee
How about doing this?
select to_char(Comment) as Comment from TABLENAME
-
Hi,
Still no joy:
WARN: Error executing statement: select to_char(Comment) as Comment
from RAFLATAC_CDW.REEL_EVENT
where SOURCE_SYSTEM = 'RAFLOW.SC' and TRANS_PERIOD = '201701'. On connection: RAF_LAVASTORM_CDW@DEVDW
Line: 12; BrainScript: sqlSelect(1,_sqlQuery1)
Operator: 'sql-select'
Error Code: brain.node.OdbcSession.cpp.169
-
Lavastorm Employee
One more random thing to try:
select SUBSTR(Comment, 1, 20) as Comment
from RAFLATAC_CDW.REEL_EVENT
-
Works fine for me:
select to_char(Comment) as Comment from TABLENAME
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules