ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Calling Database table values Dynamically

Post new topic  Reply to topic
 Calling Database table values Dynamically « View previous topic :: View next topic » 
Author Message
Vamsi Krishna
PostPosted: Tue Mar 17, 2015 9:10 pm    Post subject: Calling Database table values Dynamically Reply with quote

Acolyte

Joined: 12 May 2014
Posts: 53

Hi All,
I am working on a task to retrieve table values from sql server database for exchange rates. I am using select statement by using select.* iam able to retrieve the values but the modification i received is if the client needs only one column values from 9 columns i have to call the values dynamically from database. I have tried using select variable the variable is having the column name but the select statement printing the column name all times into the Environment. Anyone help me how to execute this statement
Back to top
View user's profile Send private message
ganesh
PostPosted: Wed Mar 18, 2015 8:09 am    Post subject: Reply with quote

Master

Joined: 18 Jul 2010
Posts: 294

Is your requirement create sql query dynamically based on the input?

Create stored procs for all possible combinations and call them based on the request.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Mar 18, 2015 8:25 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

You could potentially use EVALUATE... but it comes with a performance cost...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Vamsi Krishna
PostPosted: Wed Mar 18, 2015 6:55 pm    Post subject: Reply with quote

Acolyte

Joined: 12 May 2014
Posts: 53

ganesh wrote:
Is your requirement create sql query dynamically based on the input?

Create stored procs for all possible combinations and call them based on the request.


Yes my requirement is calling the sql query dynamically ok i will try with the stored procedures
Back to top
View user's profile Send private message
Vamsi Krishna
PostPosted: Thu Mar 19, 2015 6:38 pm    Post subject: Reply with quote

Acolyte

Joined: 12 May 2014
Posts: 53

Vamsi Krishna wrote:
ganesh wrote:
Is your requirement create sql query dynamically based on the input?

Create stored procs for all possible combinations and call them based on the request.


Yes my requirement is calling the sql query dynamically ok i will try with the stored procedures


I am able to retrieve data from database i had used some conditional statements in esql and iam able to receive data from the database.
Back to top
View user's profile Send private message
mgk
PostPosted: Fri Mar 20, 2015 10:52 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1638

You may find that PASSTHRU helps with this as it allows you to construct queries to send to the DB dynamically. And the performance is the same as regular ESQL queries (assuming you use parameter markers) and is much better than EVAL.

Kind regards,
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
Vamsi Krishna
PostPosted: Mon Mar 23, 2015 12:48 am    Post subject: Reply with quote

Acolyte

Joined: 12 May 2014
Posts: 53

mgk wrote:
You may find that PASSTHRU helps with this as it allows you to construct queries to send to the DB dynamically. And the performance is the same as regular ESQL queries (assuming you use parameter markers) and is much better than EVAL.

Kind regards,


Thanks mgk i will check with the PASSTHRU statement
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Calling Database table values Dynamically
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.