Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
Designing Analytics Reports
Validating Input Parameter Against Database Value
Migrateduser
Hi
In my report, I need the user to enter a parameter, which happens to be a table name, which is in turn, present in a database table.
For example, assume I have to generate reports for different type of cars viz. BMW, AUDI, BENZ, PORSCHE.
I have a default metadata table called "CARS" which will have the entries
CARS_ID CAR_TABLE_NAME
1 BMW
2 AUDI
3 BENZ
4 PORSCHE
--
My Customers/users can add any number of entries here which is not in my control. I expect that a table with name mentioned in CAR_TABLE_NAME be present in the database with a schema I specified.
So in this case, I expect BMW, AUDI, BENZ and PORSCHE tables to be present in the database.
The user will be entering one of the names as the parameter and I need to validate whether the entered value is actually present in the CARS table. If it is present there, then I need to check whether if the table exists in the database and then carry on my operation. These I do it via db queries.
But how will I actually test it when I am running the report via the command prompt. If I don't validate first, then I will be running a query like
"select * from VOLKSWAGEN"
which will throw me a "SQL statement does not return a ResultSet object." Exception
---- Can I query the database directly without creating a dataset?
---- Can I create a dataset and then invoke it directly/without the help of a table
please help.
thanks
Find more posts tagged with
Comments
There are no comments yet