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
Benefits of Stored Procedures?
Can a cursor be updated? If yes, how you can protect which columns are updated?
How do I create a stored procedure in dbml?
What is the purpose of sql profiler in sql server? : sql server database administration
Explain trigger and its types?
What are points to remember while using the fillfactor argument?
What is the usage of the sign function?
What is create command?
Name 3 ways to get an accurate count of the number of records in a table?
Explain the etl (extraction, transformation, and loading)?
what is a correlated sub-query? : Sql server database administration
Introduction of rollup clause using sum and group by clause?
What is deploy, process and build? : sql server analysis services, ssas
How will you find out if there are expensive SQL statements running or not?
What is the difference between Triggers and Stored Procedure?