Skip to Content
avatar image
Former Member

Field names in select statements and Data structure

Hi Friends,

I am using the JDBC Sender, am selecting the datas from the 3 tables using the join statement. I am selecting only the required fields from the DB (Not using *). For this do i have maintain the sequence of the fields in the select statement and in the xi data type structure as same. And at the same time do i should maintain the names of the field also unique in the select and in the xi data type as same.

Thanks

Prem

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

5 Answers

  • avatar image
    Former Member
    Sep 24, 2008 at 04:43 AM

    Hi

    do i have maintain the sequence of the fields in the select statement

    you are just selecting the records so no sequence is required in the select statement .

    do i should maintain the names of the field also unique in the select and in the xi data type as same.

    in the select statement you will mention the nam of the filed as same as in the database in XI it need not to be same or necessary

    Regard's

    Chetan Ahuja

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 24, 2008 at 04:49 AM

    In select statement mention write this way:

    select table1.field1,table2.field2 from table1,table2......

    In XI while creating data type field name can be anything.

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 24, 2008 at 04:51 AM

    Hi Prem,

    No need of sequence required in the select statement.

    Either you specify a valid SQL SELECT statement to select the data to be sent from the specified database, or specify an SQL EXECUTE statement to execute a stored procedure that contains exactly one SELECT statement. The expression only needs to correspond to the SQL variant supported by the respective JDBC driver; so it can be done using table JOINs.

    Example:

    Table #1

    Header

    Name EmpId Status

    Jai 5601 0

    Karthik 5579 0

    Table #2

    Item

    Name Contactnumber

    Jai 9894268913

    Jai 04312432431

    Karthik 98984110335

    Karthik 04222643993

    select Header.Name, Header.EmpId, Item.Contactnumber from Header,Item where Header.Name = (select min(Header.Name) from Header where Header.Status = 0) and Header.Name = Item.Name

    Regards,

    Vinod.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      >>I have one more doubht when the select statement executes in the sender jdbc channel the records get selected but how it comes into Xi i.e how it comes to the message.

      After Selecting the records from Dbase JDBC Adapter will convert those into xml format and send it to XI's integration Server fpr further processing.

      the Flow internally will be like that only. For Example if you consider the File Adapter also the same Case will applicable,

      So dont worry abt the processing

      Regards

      Seshagiri

  • Sep 24, 2008 at 05:36 AM

    Hi Prem,

    As Integration engine can understand xml formats these picked records will be converted in to XML and dropped in to Integration engine for processing.

    Basically what happens to sender JDBC adapter is when you give the select statement as well as update statement.what you do is that once you select the data from data base you use an update query to set a flag to false,so that you dont select that data again next time.

    Plz have a look at this blog

    Tips and Tutorial for Sender JDBC Adapter

    Regards,

    Vinod.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 14, 2008 at 09:10 AM

    answered

    Add comment
    10|10000 characters needed characters exceeded