Hello
I am a beginner in Oracle!!!
I would like to know....I have a table
STOCK
-----------
Branch varchar2(2)
TrnType number
KEYNo varchar2(2)
Quantity number
In the above primary key is Branch + TrnType + KeyNo
I have a query
SELECT Branch,TrnType, KEYNo,Quantity from STOCK where Branch = 'IND';
My problem is the value for Branch ie. IND is known at runtime only and I need to store this query in Database. If I store it as a view I can only select records with branch code IND.
What method I can use to retrieve the records which satify the above condition....(P ROCEDURES, CURSOR if so how????)
Thanks & Regards
Reshmi
I am a beginner in Oracle!!!
I would like to know....I have a table
STOCK
-----------
Branch varchar2(2)
TrnType number
KEYNo varchar2(2)
Quantity number
In the above primary key is Branch + TrnType + KeyNo
I have a query
SELECT Branch,TrnType, KEYNo,Quantity from STOCK where Branch = 'IND';
My problem is the value for Branch ie. IND is known at runtime only and I need to store this query in Database. If I store it as a view I can only select records with branch code IND.
What method I can use to retrieve the records which satify the above condition....(P ROCEDURES, CURSOR if so how????)
Thanks & Regards
Reshmi
Comment