WRITE A FUNCTION TO DISPLAY THE OUTPUT OF AN EXISTING TABLE
RANGE LIKE COMMAM SEPERATED VALUES LIKE RANGE1,RANGE2,...
Answer Posted / carmel franco
Create function int select_dynamic(range varchar(255))
As
declare
@Qry Varchar(2000)
Begin
Begin try
Set @Qry =”select * from table1 where col1
in (“+range+”)”
Exec @qry
Catch
Print “error processing parameter”
Return -1
End try
Return 1
END
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
How to achieve Paging of records in SQL SERVER?
What is purpose of normalization?
What is the stuff?
How to apply cascading referential integrity in place of triggers?
you notice that the transaction log on one of your databases is over 4gb the size of the data file is 2mb what could cause this situation, and how can you fix it? : Sql server administration
If a stored procedure is taking a table data type, how it looks?
Write query to return all rows sql?
Explain Geography datatype in SQL Server
What is the process of normalization?
How to delete duplicate records based on single column from a table?
What is 2nf in normalization?
What you can do to delete a table without the delete trigger firing?
What is impersonation? What are the different impersonation options available in ssas? : sql server analysis services, ssas
Introduction of rollup clause using sum and group by clause?
How can you ensure that the database and sql server based application perform well?