Question : Doing an INSERT or Update based on if the record already exists or not while importing data from a text file to SQL SERVER 2005.

I have this stored procedure that's working fine, just two issues with it.

1 - Doing an INSERT or Update based on if the record already exists or not while importing data from a text file to SQL SERVER 2005.
2 - Taking care of the special Characters like  é while import.

Here's my stored procedure that is working fine:

USE [DataTest]
GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE procedure [dbo].[load_data]
as
begin
bulk
insert USERSTEST
from 'D:\loadData.csv'
with
(
fieldterminator = ',',
rowterminator = '\n'
)
end

------------
Sample Data in CSV file
abc123,Janathan,José ,,Staff

Answer : Doing an INSERT or Update based on if the record already exists or not while importing data from a text file to SQL SERVER 2005.

The easiest way is clonizing your har drive. you can use both enterprise tools like "acronis" or just using dd command in linux. This way you do not need to do anything and if you have a full version kernel and modules on your old drive after  ">> "4.Turn on laptop and see what happens..." you will have a fully functional Linux. like the one you have been using on your desktop.

If  you have experience in installing and repairing boot loader you can just copy whole the HDD data on your new disk and then try to repair it. In the case of SuSE its too easy but in ubuntu it is more complicated.

Random Solutions  
 
programming4us programming4us