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 a sql join?

951


What are the advantages of using stored procedures in sql server?

950


Can I disable or restrict ssrs export formats (rendering formats)?

140


What are partitioned views and distributed partitioned views?

976


Explain forward - only cursors?

976


How to configure odbc dsn with different port numbers?

1021


What is the primary use of the model database?

1017


Explain go command in sql server?

964


Is the log file is a part of file group?

974


How to delete duplicate rows in sql server?

1054


Explain various data region available in ssrs with their use?

873


What do you mean by a dependent functionality in a build?

1062


Does an index slow down updates on indexed columns?

911


Is it possible to import data directly from t-sql commands without using sql server integration services? If so, what are the commands?

1322


How to use the inserted and deleted pseudo tables?

911