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

How to loop through returning rows?

737


how to restart sql server in single user mode? How to start sql server in minimal configuration mode? : Sql server database administration

662


Is sql server a database?

696


What is index in an assignment?

695


What is instead of dml trigger?

774






What is filtered index?

819


What are the default system databases in sql server 2000?

685


What is difference between views and tables?

637


what is a schema in sql server 2005? Explain how to create a new schema in a database? : Sql server database administration

720


Does partitioning help performance?

685


What is temporary table in sql server? Why we use temp table?

703


How does clustered and non clustered index work?

679


How adventureworkslt tables are related?

681


What are the different authentication modes in sql server? How can it be changed?

774


What is stored in the mssqlsystemresource database? : sql server database administration

778