Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Passing parameter to view in DB2  RSS feed

 
Parameswaran Thangavel
Ranch Hand
Posts: 485
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
How one can pass the parameter to the DB2 view. I need to pass the parameter and retreive the value also.

Any pointers will do
 
Scott Selikoff
author
Bartender
Posts: 4093
21
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Views are like tables and can be accessed the same way you would access a table. Can you be more specific about what parameters you want to pass to the view?
 
Parameswaran Thangavel
Ranch Hand
Posts: 485
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi scott,
Thanks for your time.

My requirement is i need to filter out the data based on the user input, and i think this cant be acheived in view, since view didn't support the parameter.

what exactly i need to do is write the stored procedure which will use the view and user input to filter out the invalid records.

Anyway thanks for your time.
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 37241
519
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Parameswaran Thangavel:
My requirement is i need to filter out the data based on the user input, and i think this cant be acheived in view, since view didn't support the parameter.

A view supports parameters unless we are talking about different things. You create the view once to abstract away some complexity. Then you do the query as if it were a normal table.

You may want to post some code showing what you are trying to do that isn't supported. Then we could give more concrete comments.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!