March 17, 2009 at 12:50 am
Hi,
All the stored procedures in our application are using a single view for data fetching from the DB. That view contains a single select statement which fetches 2 columns from a user defined function. We have a separate table (Say XXX) where we stored some sql queries and a flag. Now based on the user logged in to the application we have to select some queries from the XXX. Based on the flag column of XXX we have to UNION the result set of some queries with the view and EXCEPT the result set of the queries from the view. What we plan is, we can create a string variable (with all unions and excepts) and then use the EXEC statement we can get the result set. Now the problem is 1) We cannot use EXEC inside a function or view 2)Though we can use EXEC inside a SP we cannot call SP from a function or a view
Please provide some suggestions if anybody experienced the same problem
March 27, 2009 at 3:08 am
Hiii chck out SQL SERVER INTERVIEW QUESTIONS TO KNOW THE SOLUTION:
http://fresherswisdom.com/interview-questions/4-c.html
SQL INTERVIEW QUESTIONS
http://www.fresherswisdom.com/interview-questions/94-sql.html
SQL SERVER TUTORIALS
http://www.fresherswisdom.com/free-tutorials-collection/free-sql-tutorials.html
SQL SERVER 2000 INTERVIEW QUESTIONS
http://www.fresherswisdom.com/interview-questions/34-sql-server-2000.html
🙂
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply