IBM Sterling Transformation Extender

Sterling Transformation Extender

Come for answers, stay for best practices. All we're missing is you.


#Sterling
#Supplychain
 View Only
  • 1.  'Select * ...' using db adapter in Event Server

    Posted 03/22/05 07:13 AM

    Originally posted by: SystemAdmin


    I have a map that includes an input card using the database adapter to connect to SQL Server. The Command for this card includes the -STMT option with something similar to "SELECT * FROM SomeTable WHERE Something".

    This works fine when running the map from the map designer, however, when running via the event server, the * is being replace with the input file name resulting in a statement of "SELECT Input.txt FROM SomeTable WHERE Something". I have tried enclosing the -STMT in single quotes, and double quotes, as well as leaving it with no quotes.

    Wildcards in the Event Server are extremely useful, but in this case, are causing me a major headache.

    Does anyone know an easy way to work around this issue (other than specifying a field list).

    Thanks
    • Andy

    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender


  • 2.  Re: 'Select * ...' using db adapter in Event Server

    Posted 03/22/05 05:55 PM

    Originally posted by: SystemAdmin


    Andy,

    I've gotten around this 'challenge' by defining a resource name/alias such as 'TheQuery' with the value for the SELECT (ie. SELECT * FROM SomeTable). This resource name is then used in the Database adapter 'Command' (ie. -STMT %TheQuery%). See 'Resource Registry' doc for more info if you're not familiar with this component.

    -Jim.
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 3.  Re: 'Select * ...' using db adapter in Event Server

    Posted 03/24/05 07:35 AM

    Originally posted by: SystemAdmin


    Jim, thanks for the suggestion, it definitely sounds like that would work.

    In case anyone is interested, I received a few other suggestions via email, and the one that worked was to enclose the statement in double quotes ("), and the asterisk in single quotes ('). My statement now looks like...

    "SELECT '*' FROM SomeTable WHERE Something".

    The Event Server now leaves the asterisk in tact, and the statement is passed properly to SQL.

    • Andy

    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender