Skip to Content
avatar image
Former Member

Fetching single record from Table

Hi Friends,

How can we fetch a single record from a table and later on update the flag of same record after processing ?

Regards,

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

10 Answers

  • avatar image
    Former Member
    Aug 20, 2007 at 07:40 AM

    Hi Friends,

    We want to fetch single <b>SINGLE RECORD</b> from table and want to update that record only after getting processed using flag attribute

    Definitely i am talking about sender communication channel only when i am talking about fetching ....else i would have used "Pushing the record in table" for receiver side..

    Still waiting for point zero answer..:-)

    Regards,

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      hey

      >>Definitely i am talking about sender communication channel only when i am talking about fetching

      you can also use the word fetch if ur doing a synchronous scenario with Database:)

      Thanx

      Aamir

  • avatar image
    Former Member
    Aug 20, 2007 at 08:42 AM

    Hi Amir,

    Points awarded..:-)...still a query isn't there any other way to proceed in this scenario ?

    Regards,

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 20, 2007 at 07:24 AM

    Hey

    you want to fetch from sender side or receiver side?

    Thanx

    Aamir

    Message was edited by:

    Aamir Suhail

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 20, 2007 at 07:29 AM

    Use <i><b>SQL Query statement</b></i> for selecting the record and then use <i><b>update SQL query</b></i> for updating the flag in sender JDBC Adapter of processing parameters....

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 20, 2007 at 07:30 AM

    hi santosh,

    u can easily do it using a sender jdbc adapter.

    during configuration: specify the complete query in Query SQL statement using a where clause so that a specific record is fetched.

    Then in Update SQL Statement give the appropriate statement. it will update that record.

    [reward if helpful]

    regards,

    latika.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 20, 2007 at 07:31 AM

    Hi Santosh,

    I guess you are referring to sender JDBC adapter.

    you can use update sql statement in the sender comm channel to update that flag of the same record.

    Regards

    Pushkar Anand

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 20, 2007 at 07:33 AM

    Hey

    well as everybody is assuming that ur doing this on the sender side,lemme assume the same:)

    have a look at the following blog

    /people/yining.mao/blog/2006/09/13/tips-and-tutorial-for-sender-jdbc-adapter

    Thanx

    Aamir suhail

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 20, 2007 at 07:48 AM

    Hi Friends,

    I don't want to use <b>select * </b> while selecting the record...as there will be n no. of records with flag value Y or N ...and definitely i can update the record also....

    but out of n records( lets suppose which we will get for a flag value "y") i want to select 1 record from table and then want to process and finally want to update it and then again i want to select another record and do the same......similarly further records ...one by one for all records having flag value 1.

    Hope my question got more clearer.

    Regards,

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hey

      to select single row you need to use use Singleton select but this is allowed only as a part of stored procedure or pre-compiled program,but its not allowed in interactive SQL.

      the syntax for singleton select is

      select into <parametrs> from <table name> <condition>

      Thanx

      Aamir

  • avatar image
    Former Member
    Aug 20, 2007 at 08:11 AM

    Hi Amir,

    You got me right...but still few doubts remaining...like what is singleton select...? and from your reply can i make this point that in XI we can't handle this type of scenario but for making this type of scenario work we will have to write a code (stored Procedure may be) at RDBMS level..

    Points awarded..:-)

    Regards,

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hey

      as far as i know,it might not work in XI coz of the syntax

      see the syntax is

      select into <parameters> from <table> <condition>

      now this <parameter > is basically list of variables which needs to be declared before in the program ,so in my knowledge stored procedure is the best way to handle this.

      Thanx

      Aamir suhail

  • avatar image
    Former Member
    Aug 21, 2007 at 04:44 AM

    Varun,

    Though yet no concrete req has come from client side just being proactive..

    Points awarded...not sure about the table fields currently..

    Regards,

    Add comment
    10|10000 characters needed characters exceeded