Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

How to achieve Paging of records in SQL SERVER?

1137


What is purpose of normalization?

998


What is the stuff?

1059


How to apply cascading referential integrity in place of triggers?

1087


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

1027


If a stored procedure is taking a table data type, how it looks?

6516


Write query to return all rows sql?

1108


Explain Geography datatype in SQL Server

1187


What is the process of normalization?

1178


How to delete duplicate records based on single column from a table?

1102


What is 2nf in normalization?

1051


What you can do to delete a table without the delete trigger firing?

1010


What is impersonation? What are the different impersonation options available in ssas? : sql server analysis services, ssas

1020


Introduction of rollup clause using sum and group by clause?

1009


How can you ensure that the database and sql server based application perform well?

1118