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...

how to give input dynamically to a insert statement in
sqlserver

Answer Posted / senthil kumar.m

Declare @sql_tmp varchar(100)

set @sql_tmp="insert into table1(col1,col2..)
select 'val1','val2','') "

sp_executesql @sql_tmp

Is This Answer Correct ?    0 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do we partition data?

1028


Explain primary key and foreign key constraints?

1031


Do you know the cursor types?

1156


Explain what is “asynchronous” communication in sql server service broker?

917


Tell about MOM Tool(Microsoft Operator Manager)?

1914


Do you know what are the steps to process a single select statement?

973


What are the different types of cursor?

1096


what are candidate key, alternate key and composite key? : Sql server database administration

917


Explain the steps to create and execute a user-defined function in the sql server?

967


What is master database? : SQL Server Architecture

1019


What are synonyms?

960


Explain in details security in SQL azure?

121


Are semicolons required at the end of sql statements in sql server 2005?

995


When you use @@error and try-catch?

1043


How to create “dependant” parameter “make, model, year”

131