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

What is difference between Datepart() and Datename() in SqlServer?

1187


is it important for a database administrator to understand the operating system and file access? : Sql server administration

1003


What is resource governor in sql server?

973


What are the differences between clustered and non-clustered index?

1003


What is the Difference Between Primary and Foreign Key?

987


Is it true, that there is no difference between a rule and a check constraint?

1021


How to filter records of table in SQL SERVER?

1062


What is msdb database? : SQL Server Architecture

1110


How do I create an extended event in sql server?

927


How to create an multi-statement table-valued function?

973


Do you know query execution plan?

1146


What are advantages of ssrs or why we should use ssrs?

137


List out the differences between global and local temp tables in sql server?

1038


Can we insert data into view sql server?

913


What happens if you add a new index to large table?

919