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 normalization is used?

1065


Differentiate between delete and truncate.

1110


Explain about Views?

1120


Explain intellisense for query editing

1074


Define right outer join in sql server joins?

1108


What are the limitations in ssrs on sql server express edition?

195


Create and insert into temp table in sql server?

1080


Find first and last day of current month in sql server

1080


explain different types of constraints? : Sql server database administration

998


Sql studio em braces a variety of capabilities, but will I need them all? Is there a simpler product ? : sql server management studio

949


Your company has 50 branches all over the country all the branches, including the head office have sql server as the database every night all 50 branches upload certain information to the head office which replication topology is best suited for the above scenario?

1185


What is difference between group by and having?

990


What are user defined functions in ms sql server?

1062


What is an execution plan?

1234


What is the data tier application?

169