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
Is it possible to create trigger on views?
How will you optimize a stored procedure optimization?
How to update multiple rows with one update statement in ms sql server?
How do I partition a table in sql server?
Is there any difference between primary key and unique with the not null condition?
How to create a dynamic cursor with the dynamic option?
What is candidate key with example?
Explain system rowset functions?
We are updating a field in sql and alter the row also.after giving the commit command the system is crashed.what will happen to the commands given,whether it will update and alter the table or not?
Define magic tables in sql server?
What have included columns when we talk about sql server indexing?
Can you explain what is sql server english query?
How to generate random numbers with the rand() function in ms sql server?
How to stop a loop early with break statements in ms sql server?
What changes in the front end code is needed if mirroring is implemented for the high availability? : sql server database administration