Hi everyone,

I have a huge problem with importing data into Microsoft SQL server 2008.

First of all I have created the database with the foreign keys etc. And now I want to import data.
I have used BULK method
i.e.

BULK
INSERT tablename
FROM 'c:\tablename.txt'
WITH
(
FIELDTERMINATOR = ',',
ROWTERMINATOR = '\n'
)
GO

but the system responded that I do not have access rights to use the BULK method.
And since the server is not mine I cannot fix that and use BULK.
Therefore I will need a different method. I have used Import/Export function that Microsoft SQL Server Management Studio has but there is a huge problem there, it created me a new table, and therefore I loose all the datatypes/keys/foreign keys etc that I have created.
I have no idea how to insert the data. Can anybody please help me?
I can make my information in any format you want, I just want to find a way to upload them because it is more that 5000 rows of data!!!!!!

Thanks everyone

I have found a solution :p

turn CSV to SQL and use INSERT INTO function :p

problem solved

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.