Results 1 to 7 of 7

Thread: DB Execute - Can't Extract Field Called "Comment"

  1. #1

    Default 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

  2. #2
    Lavastorm Employee stonysmith's Avatar
    Join Date
    Nov 2006
    Location
    Grapevine Tx
    Posts
    739

    Default

    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

  3. #3

    Default

    Hi,

    The "as" doesn't work. It's an Oracle DB.

    Cheers

    Peter

  4. #4
    Lavastorm Employee
    Join Date
    May 2014
    Location
    Chicago
    Posts
    113

    Default

    How about doing this?

    select to_char(Comment) as Comment from TABLENAME

  5. #5

    Default

    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

  6. #6
    Lavastorm Employee stonysmith's Avatar
    Join Date
    Nov 2006
    Location
    Grapevine Tx
    Posts
    739

    Default

    One more random thing to try:

    select SUBSTR(Comment, 1, 20) as Comment
    from RAFLATAC_CDW.REEL_EVENT

  7. #7

    Default

    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
  •