Author |
Message
|
shalini123 |
Posted: Tue Dec 23, 2003 1:05 am Post subject: Cross referencing |
|
|
Apprentice
Joined: 03 Dec 2003 Posts: 34
|
We have a requirement for cross referencing data . Has anyone done this before?
eg: For a message coming in the broker needs to pick the data value and find an associated data value from a persistent store. |
|
Back to top |
|
 |
nevin |
Posted: Tue Dec 23, 2003 1:57 am Post subject: Re: Cross referencing |
|
|
 Newbie
Joined: 16 Dec 2002 Posts: 9
|
shalini123 wrote: |
eg: For a message coming in the broker needs to pick the data value and find an associated data value from a persistent store. |
You mean a message coming into the broker needs to, perhaps, look up a database? Just use a compute node or a database node. |
|
Back to top |
|
 |
shalini123 |
Posted: Tue Dec 23, 2003 4:07 am Post subject: |
|
|
Apprentice
Joined: 03 Dec 2003 Posts: 34
|
I heard that there is something called codes table" Can this be used? |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Dec 23, 2003 5:02 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
shalini123 wrote: |
I heard that there is something called codes table" Can this be used? |
Do you know what it means, "Codes table"?
I don't.
If it's just a table, containing different codes, then yes. WMQI can access database tables.
You could for example, do this
Code: |
set Environment.Variables.CodeValue = (select R.CodeValue from Database.MyCodesTable as R where R.CodeKey = InputBody.Message.CodeKey); |
if your table was called "MyCodesTable" and had two columns called CodeKey and CodeValue. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Sandman |
Posted: Tue Dec 23, 2003 6:25 am Post subject: |
|
|
Centurion
Joined: 16 Oct 2001 Posts: 134 Location: Lincoln, RI
|
Yes, we have done it, and I personally wrote the subflow that handles it.
Rather than me just dumping what our requirements were in here, along w/ the details of how we implemented it... could you please elaborate on your requirements?
Thanks,
Sandman |
|
Back to top |
|
 |
shalini123 |
Posted: Tue Dec 23, 2003 8:53 pm Post subject: |
|
|
Apprentice
Joined: 03 Dec 2003 Posts: 34
|
The requiremtn is we get a message from front end. They are user friendly values. Howeevr value in database is different. viz Value from front end - "ABC" value in db ="1"
We need to cross ref this and send msg to database. |
|
Back to top |
|
 |
Missam |
Posted: Wed Dec 24, 2003 7:51 am Post subject: |
|
|
Chevalier
Joined: 16 Oct 2003 Posts: 424
|
Quote: |
Value from front end - "ABC" value in db ="1"
|
Hey to cross reference your database values.first of all populate your database table "MyCodesTable" to reflect all the values you expext from the front end and you can query the database correspnding value like this
SET OutputLocalEnvironment.DBValues.MyCodesTableValue = THE (SELECT t.DBValue FROM Database.MYCodeTable as t WHERE t.FrontEndValue = InputRoot.XML.FrontEndValue);
Assuming that you have two columns "DBValue" and "FrontEndValue" in your Database Table "MyCodeTable".
And don't forget to add the database and table to your inputs Tab of the compute node.
Hope this will help you.
Thanx
sam. |
|
Back to top |
|
 |
|