Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Passing parameter to view in DB2

 
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
Saloon Keeper
Posts: 4015
18
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
Marshal
Posts: 34672
367
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic