Importing A Csv File Using Dts

Jun 22, 2007

 Hi i'v e installed the file: SQLServer2005_DTS.msi
Because i've heard that i need that to import a csv file into a ms sql database. now i have no idea how to work it, like to even make it open.
Where would i open it from?
 
I reckon i'v eread enough literature about using it, to be able to have a bash...
 
thanks in advance...
 
 

View 3 Replies


ADVERTISEMENT

Importing Data To An Existing Database Column From An .xsl File Or .cvs File

May 15, 2006

good morning,

 I want to load data that i receive everydays from my customers in .xls file format (excel) or cvs file format,  to the database that i have created on this purpose. but  when trying to do that whith SSIS; i got an error message .... that i can't import redudant data in my database column.

 

Best regards.

View 1 Replies View Related

Importing .DAT File

Oct 5, 1999

Hi, this is my first time and was wondering what's the best way to do the following:
i've sql server 6.5. also have a sql database(.DATfile) in a folder.
i need to import this database to my server. should i just LOAD/import it? or do i need to first create a database device on my server(how much size should i allocate etc) and then load it??

thanks a lot

rohit

View 3 Replies View Related

Importing Txt File

Jun 24, 2002

Hi guys,
I have to write a Store procedure which will pickup a txt file from a destination, read it and update some table.
How to pick and read a txt file in a Stored procedure.
Thanks in advance
Vineet

View 1 Replies View Related

Importing .csv File

Jun 11, 2007

Hi,
i am having problems while importing a .csv file.
when i import a .csv file in sql server I get the folowing error message.
"Cannot create an OLE DB accessor. Verify that the column metadata is valid".

Any help would be appreciated

View 3 Replies View Related

Importing A .txt File

Jul 23, 2005

I have a .txt file that I need to add to an existing table, which ismade up of Varchar, Char, numeric and int fields.What is the best way to do it.The first thing I tried was importing the .txt file, and then goinginto the design and changing the field type, but I hit problems on theNumeric fields.Then I tried changing the field types from varchar to different typesat the transfom stage of importing, but that failed too.Regards,Ciarán

View 2 Replies View Related

Importing A CSV File

Nov 22, 2007

I have a CSV file that i need to import into a SQL table. The problemis the values in the first column are not brackited in "". There areover 700K rows. Is there an easy way to fix the data or have SQLcorrectly import the the data?The data looks like this1, "xxx","zzz"2, "aaa","bbb"an so on...Thanks

View 1 Replies View Related

Need Help Importing .CSV File

Sep 19, 2006

Hi all-

I am in need of some help importing a .CSV file into a SQL Server 2005 Express database. I can't use SSIS because it's SQL Server Express. The operation needs to run as a parameterized Stored Proc which I will call from ASP.NET.

The problem is that I need to get the only 2 columns from the text file, then "tack on" 3 more columns that will have data that changes, which will come in as parameters to the T-SQL stored proc. This prevents me from using a straight BULK INSERT.

The data in each of these columns will be the same for each record in that column - that is, every record in every field in column 3, for example, will be the same.

Some of the files will have 4 million records and up, so speed is of the essence here. I tried using BULK INSERT to dump the data into a #temporary table - which took 38 seconds and was acceptably fast - but then, my next step was to dump the additional data into the other columns using UPDATE... SET. I gave up on this after the query ran for THIRTY MINUTES! My next step was going to be to move the data from the temporary table into the target permanent table somehow, but I never got that far when I saw how long the previous step took...

It's a little odd, because I can do the same thing in MS Access in under 5 minutes by using a SQL statement like this in my ASP.NET code:

"INSERT INTO [Target_Table] (field1, field2, field3, field4)" & _
"SELECT F1, F2, '" & strSource & "', Now() AS DateTimeStamp " & _
"FROM [Text;HDR=NO;DATABASE=" & strPath & ";].[" & strFilename & "]"

strSource is a string that the User enters (properly vetted for security); strPath and strFilename are strings holding the path and filename to the .CSV file. I create a unique filename from the file the user uploads. This works in under 5 minutes for several millions of records in MS Access, as I said above. I've had no luck getting anything similar to work in SQL Server, though.





Anyway, does anyone have any ideas? This is somewhat urgent, as the project was about to go "live" when it was discovered that the actual, live data had grown to the point where Access couldn't hold it, and a move to SQL Server Express was necessary.

Thanks in advance,



-Andrew

View 9 Replies View Related

Importing CSV File With URL Using DTS???

Sep 19, 2005

I need to be able to create a DTS package that imports a CSV file which is loated at URL.  I.E.  HTTP://www.url.com/csv/thefile.xls I tried copying the URL an pasting it in the file location when in SQL wazird but I got an error message.

View 1 Replies View Related

Importing CSV File

Jun 4, 2007

I'm a newbie to SSIS, so there is probably an easy solution:



I'm importing from a csv file into a db table, but would like to remove the quotation marks from around the data before inserting into the table.



Are there any suggestions of how to remove the "data" marks? Would a Foreach Loop container work for this?

View 1 Replies View Related

Importing And Excel File

Jul 31, 2007

How do i import a Excel file into a table i have created in my database in SQL server 2005??? 

View 10 Replies View Related

Importing Text File To Sql

May 1, 2008

Happy Thursday all,
I am importing a text file to sql and most of my fields look like this:
"M","NEW ADDRESS",
and my other field looks like this:
"firstname Lastname"
but I need it like this:
"firstname", "Lastname"
Can anyone help me understand a better way of making this happen?
 
Thanks in advance

View 2 Replies View Related

Importing Csv File To SQL Server

Jul 22, 2004

Can someone please help me.
I need to import a csv fiel to sql server and I know that the column delimiter is
and the newline delimiter is but I don't know what the rowterminator is or the fieldterminator. How can I import the file into an empty table in an existing database.
Any suggestions would be greatly appreciated.

View 1 Replies View Related

Importing Text File To SQL

Sep 15, 2004

HI Guys,

I am doing the following to read the data in a text file and inserting it into SQL.

1) Open db connection
2) Open Text File
3) loop through text file all along inserting each row into the db
4) close the text file
5) close the db connection

However, the text file has over 400 rows/lines of data that need to be inserted into the db. Each line in the text file is a row in the db. At anyrate, the above script times out. Is there a better, faster way to do this? I can't use Bulk Insert due to permissions previlages.

Thanks in Advance!

View 2 Replies View Related

Importing An Oracle .dmp File Into SQL

Sep 4, 2001

Hi all,
Please let me know if it is possible to import an Oracle .dmp binary file into SQL using DTS. DTS has ODBC and OLE DB drivers for Oracle but both require specifying the Oracle database name, user name and password. i.e., it looks like the only way to import the .dmp file into SQL would be to first load the .dmp file into Oracle and then tranfer it from Oracle to SQL using DTS. Is there any way to load the .dmp file directly into SQL?
The .dmp file is a binary file that has been generated from Oracle using the 'Export' utility.

Thanks in advance,
-Praveena

View 2 Replies View Related

Importing Flat File Using DTS

Dec 6, 2000

I have large flat files that I need to import using DTS. The record counts are between 500,000 and 3000,000. Or, 16 to 116 MB. When creating the DTS package I need to use to import, the wizard is haulting at the point where I should place the fixed points for the fields. I thinks it is because, the wizard will only recognize excel or text files. I cannot save these files as either txt or xls, because of their size. does anybody have any suggestions?

View 3 Replies View Related

Importing Data From A CSV File

May 19, 2004

I am building a aspx/c# application with SQL Server 2000 backend. Now i want to have the option for "Importing" the data into one of the tables in my database.

The source file for the import is a text file , CSV format. I want the users to click on the "Import" button placed on my webform and supply the souce file and the data should get imported into the SQL Server 2000 database table.

I want to know the various ways to implement this. Is it possible to invoke the DTS and then DTS will itself guide the users do the import? or if i need to write a SQL query , what would that be like??

View 2 Replies View Related

Dynamically Importing Csv File Into MS SQL

Feb 14, 2007

I have an app written in delphi v5 with a MS SQL Database and I'm struggling with an import feature i need

The user needs a function to import Contact data from a txt/csv file into the Contact Table

Details of feature:
the user enters the different parameters into the Delphi app e.g.
File Location
Files Includes Column Headings or not
Whether the file Comma or Tab Seperated
Mapping the fields

Then i need to use those parameters and run some sort of import routine putting the data into the specific table.

The tables consists of 3 fields - First Name, Surname, Mob Number - but these fields can be in any order in the file. for example Col 1 (in file) needs to go into Field 3 in DB. this is sorted in the Mapping Fields above

How do I do this using MS SQL??

I've been looking at using the BULK INSERT command e.g
BULK INSERT Contact
FROM 'C:Import_data.csv'
WITH
{
FIELDTERMINATOR = ',',
ROWTERMINATOR = ''
}
but at the minute i just get error -
[Microsoft][ODBC SQL Server Driver]Syntax error or access violation.

Is this the correct command to use??

Do you know any websites that can point me in the right direction??

I have an app written in delphi v5 with a MS SQL Database and I'm struggling with an import feature i need

The user needs a function to import Contact data from a txt/csv file into the Contact Table

Details of feature:
the user enters the different parameters into the Delphi app e.g.
File Location
Files Includes Column Headings or not
Whether the file Comma or Tab Seperated
Mapping the fields

Then i need to use those parameters and run some sort of import routine putting the data into the specific table.

The tables consists of 3 fields - First Name, Surname, Mob Number - but these fields can be in any order in the file. for example Col 1 (in file) needs to go into Field 3 in DB. this is sorted in the Mapping Fields above

How do I do this using MS SQL??

I've been looking at using the BULK INSERT command e.g
BULK INSERT Contact
FROM 'C:Import_data.csv'
WITH
{
FIELDTERMINATOR = ',',
ROWTERMINATOR = ''
}
but at the minute i just get error -
[Microsoft][ODBC SQL Server Driver]Syntax error or access violation.

Is this the correct command to use??

Do you know any websites that can point me in the right direction??

Hope all this makes sense

Thanks

View 1 Replies View Related

Importing SQL File From MySQL

Jul 25, 2006

Is there a specific way i shoudl setup the way i export my tables tfom mysql to import them into MSSQL? Im exporting it to .sql and i have tried a bunch of different options but every time i try to import the .sql file to MSSQL i get stuff like this

There was an error importing the database. The status of the import is unknown.

Incorrect syntax near '='.
Incorrect syntax near '`'.


also... how hard would it be to import a .TAB file (which is a csv file but uses tabs instead of commas)?

View 14 Replies View Related

Dynamicallly Importing Csv File Into MS SQL

Feb 14, 2007

I have an app written in delphi v5 with a MS SQL Database and I'm struggling with an import feature i need

The user needs a function to import Contact data from a txt/csv file into the Contact Table

Details of feature:
the user enters the different parameters into the Delphi app e.g.
File Location
Files Includes Column Headings or not
Whether the file Comma or Tab Seperated
Mapping the fields

Then i need to use those parameters and run some sort of import routine putting the data into the specific table.

The tables consists of 3 fields - First Name, Surname, Mob Number - but these fields can be in any order in the file. for example Col 1 (in file) needs to go into Field 3 in DB. this is sorted in the Mapping Fields above

How do I do this using MS SQL??

I've been looking at using the BULK INSERT command e.g
BULK INSERT Contact
FROM 'C:Import_data.csv'
WITH
{
FIELDTERMINATOR = ',',
ROWTERMINATOR = ''
}
but at the minute i just get error -
[Microsoft][ODBC SQL Server Driver]Syntax error or access violation.

Is this the correct command to use??

Do you know any websites that can point me in the right direction??

Thanks

View 2 Replies View Related

Importing Into Sql Server2000 Using DTS From CSV File

Feb 27, 2008

Hello Everybody,
I am importing an csv file into Sql Server straight forward no data cleansing or anything and i noticed everyday it misses the last row in the CSV file.
Has anybody come accross this if so is there anything that i can do to get that row.

ANY HELP ON THIS IS GREATLY APPRECIATED.


Thanks In advance....

View 5 Replies View Related

Dynamic File Name For Importing?

Apr 18, 2012

I have a stored procedures that will import 28 CSV files with different columns layout for each one, into their own table in SQL Server 2008 and a master stored procedure which will execute the other 28 store procedures.

All the CSV files are stored on the network drive in one folder.The naming of these files will vary from week to week and I don't want to manually change the names in the stored procedures. Each table name has a unique Identifier F1 to F28 that will be a constant before the rest of the name for example ...

F1_country23
F2_region12

Can I use the unique Identifier to add an wildcard or variable to the stored proc so it will pick any file in the folder for example with "F1" or "F2" meaning format layout 1 or 2 and use the correct stored procedure like below?

WHEN 'F1' THEN 'usp_F1_ImportScript'
WHEN 'F2' THEN 'usp_F2_ImportScript'

Example SQL scripts so far ...

Code:

Create PROC [dbo].[usp_F1_ImportScript]
-- Check if template table already exists and if it does then delete the table
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[CSVTest]') AND type in (N'U'))
DROP TABLE dbo.CSVTest
-- Create a new template table

[Code] ....

the SP which will run the 28 SP

Code:
CREATE PROCEDURE [dbo].[usp_FilePicker] (@FileName VARCHAR(255))
AS
--check if @FileName is null
IF @FileName IS NULL
BEGIN
SELECT 'No Files Match' AS ERROR

[Code] .....

I cannot use SSIS because other users from different countries (50+ so far) may need to add/delete columns in the raw text/cvs files (for their own test environment) meaning there may be changes needed to made to the SQL scripts and with documentation any user without experience with MSSQL would be able to make simple changes.

View 1 Replies View Related

Importing TEXT File In DTS

Feb 18, 2004

Hello Guys,

I Hava a Source text connection and I'd like to take just the first row ( the header, of course) of the file to one table. How can I get this??

Tis is quite Urgent.
Thanxs;

View 5 Replies View Related

Importing A Csv File On A Schedule.

May 6, 2004

I am trying to import some data from a csv file on a regular basis. This file, however, is stored on a website. I can't seem to find a way, either using DTS or a stored procedure to make this task simple. If the file is at http://www.mysite.com/import.csv is there anyway I can get DTS to download that file and import it into a new table?

Thanks,
Scott

View 3 Replies View Related

Importing Data From CSV Or Txt File

Jul 27, 2006

Hi

How can i import data from a csv file or text file

i have the text file located at C:Imports/Importdata.csv

the table that i have is as follows:

CREATE TABLE Invoice
(
InvoiceID INT IDENTITY (1, 1) PRIMARY KEY NOT NULL,
Invoice_no VARCHAR(50),
RefText VARCHAR(50),
CustomerDetails text,
)

i dont have any data for the invoiceID is it possible to import the data from the csv file .... the csv file partially is shown below...

Invoice_no, RefText, Customer details
272727, treesale, Garstang
345667, TidyBox, northampton



thanks

View 11 Replies View Related

Dynamicallly Importing Csv File Into MS SQL

Feb 14, 2007

I have an app written in delphi v5 with a MS SQL Database and I'm struggling with an import feature i need

The user needs a function to import Contact data from a txt/csv file into the Contact Table

Details of feature:
the user enters the different parameters into the Delphi app e.g.
File Location
Files Includes Column Headings or not
Whether the file Comma or Tab Seperated
Mapping the fields

Then i need to use those parameters and run some sort of import routine putting the data into the specific table.

The tables consists of 3 fields - First Name, Surname, Mob Number - but these fields can be in any order in the file. for example Col 1 (in file) needs to go into Field 3 in DB. this is sorted in the Mapping Fields above

How do I do this using MS SQL??

I've been looking at using the BULK INSERT command e.g
BULK INSERT Contact
FROM 'C:Import_data.csv'
WITH
{
FIELDTERMINATOR = ',',
ROWTERMINATOR = ''
}
but at the minute i just get error -
[Microsoft][ODBC SQL Server Driver]Syntax error or access violation.

Is this the correct command to use??

Do you know any websites that can point me in the right direction??

Thanks

View 1 Replies View Related

Importing A Tab Delimited File

Jul 5, 2007

hi all,

While importing a tab delimited file..
it seems ssis interprets the incoming col as 50 chars in length even
though it is far smaller.
any ideas how this could be??

any help would be appreciated.

View 2 Replies View Related

Importing Xls/xlsx File Into SQL

Jul 7, 2007

Hi all,

Actually, I am working in a leading advertisement company where we were handling all of our data in Access, but because our database is getting really large, we have to shift to SQL because queries were taking long time to execute. I have no idea what SQL is. However, i have a problem. In access, i had to import an xlsx(excel 2007 file) in my database. In access I used to do this:

Sub SendTableToExcel()
DoCmd.TransferSpreadsheet acImport, _
acSpreadsheetTypeExcel9, "Campaigns", _
"C:frequentstuffsCampaigns.xlsx", True
End Sub

The format(ie the col Names and structure) in table Campaign and Excel File, is same. I just need to copy the data from excel into SQL. How can i do the same thing in SQL? To be very precise, I am novice to SQL so if explained in a novice languauge, i would really appreciate it!!

Vikas B

Vikas Bhandari
Visit My Blog
www.excelnoob.blogspot.com

View 3 Replies View Related

Name Columns When Importing .txt File With DTS?

Aug 15, 2007

I'm importing a fixed width text file into SQL using DTS. The txt file is all data with no headers. I need to specify specific column names, because my next step is going to to be moving this data into multiple established SQL Tables.

Can I specify column names in DTS? It seems to always force me to name the columns Col001, Col001, etc.

Thanks

View 2 Replies View Related

Error Importing Sql File

Sep 7, 2007

I purchased a domain and website, the sql file will not import properly. Can anyone shed some light on what the problem is?

I am getting this error:

MySQL said: Documentation
#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci' at line

View 1 Replies View Related

Importing XML File Using SSIS (DTS)

Mar 3, 2006

I can use MS Access to import an XML file and it builds the columns and loads the data. I am trying to use SQL Server 2005 to do the same thing and there doesn't seen to be a way to easily accomplish the same task that works so well in Access.

Has anyone tried this? If so and you were successful, what were the steps to set up the package?



Thanks.

View 6 Replies View Related

Is Importing A Dtsx File Necessary

Aug 15, 2007

Ok, I'm actually adding a SSIS job to my job agent on my test SQL server. Noticed that when I go to my job agent --> add new job, under the steps option, I click new. this then takes me to the new job step window. When I select

Type as SQL Server Integrated Services, I then see some new tabs at the bottom of the form. Under package source I can select File System, SQL Server, or SSIS Package Store, then I have to select the location of the dtsx file.

So my question is, since I can select the actual file (package) I want to run from here, do I really have to import a package to the file system or MSDB under the SQL Integration Services on the server?

It appears to me that its kind of the same thing.










I'm new to this SSIS, SQL DB work, so I'm learning as I go. . . .

View 1 Replies View Related

Importing From A Flat File

Apr 26, 2006

I have a flat file which has five fields, and need to import into a table that has 6 fields, the first of which will be data from a variable.

i have Used a Dataflow task which has a flat file source task . i need help to get the data from that into the table



Table field1 field2 field3 field4 field5 field6

@Variable

File Col0 Col1 Col2 Col3 Col4



can anyone explain how i can achieve thsi

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved