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

select the 3rd maximum salary from sql server database if 4
(just an example In practically I may not know the exact
situation) of the highest salaries are equal.

Answer Posted / sandeep saxena

CREATE procedure Proc_Loaddata_Text (@File_path nvarchar
(255),@Table_Name varchar(100)) AS

DECLARE @SQLString NVARCHAR(4000)

/* Build Command*/

SET @SQLString =N'Bulk Insert ['+@Table_Name+'] from ' +
N'N''' + @File_path + N''' with (FIELDTERMINATOR=''|'',
ROWTERMINATOR = ''\n'')'

--print @SQLString

/* Execute */

EXEC (@SQLString)
GO

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Benefits of Stored Procedures?

957


Can a cursor be updated? If yes, how you can protect which columns are updated?

1090


How do I create a stored procedure in dbml?

988


What is the purpose of sql profiler in sql server? : sql server database administration

1085


Explain trigger and its types?

1052


What are points to remember while using the fillfactor argument?

952


What is the usage of the sign function?

1079


What is create command?

960


Name 3 ways to get an accurate count of the number of records in a table?

1010


Explain the etl (extraction, transformation, and loading)?

980


what is a correlated sub-query? : Sql server database administration

921


Introduction of rollup clause using sum and group by clause?

938


What is deploy, process and build? : sql server analysis services, ssas

1085


How will you find out if there are expensive SQL statements running or not?

1002


What is the difference between Triggers and Stored Procedure?

1081