Showing posts with label csv. Show all posts
Showing posts with label csv. Show all posts

Sunday, March 25, 2012

automatically import csv to MsSQL

Hi is there a way to emulate the MSSQL import wizard with a command prompt so I can shedule an automatic import form a csv file?
Thansk!Look up BCP (bcp in) and bulk insert in BOL. There are several command line parameters that can be used. Sometimes you can get by with filename and table table.

Bill|||If you're using the import wizard, just save it as a DTS package (option available at the end). You can then schedule the DTS package to run whenever you want. Look at www.sqldts.com for information on DTS.|||Thanks! I didn't notice you could save the DTS.

I'll try that, since the file and table will be fixed, I'm sure it will work!

Thansk again.|||Better look closely at the options you select.

Tuesday, March 20, 2012

Automatic SQL Queries to dump data to folder

Hey everyone, trying to set up a SQL Query to run on a pre-determined
batch cycle that will automatically dump out specific table data to a
..csv file so that users can load the file into Excel right away, with
no manipulation or modification.

We are running SQL Server 2000. I am a novice SQL user. Any
suggestions?kosta.triantafillou@.gmail.com (kosta.triantafillou@.gmail.com) writes:
> Hey everyone, trying to set up a SQL Query to run on a pre-determined
> batch cycle that will automatically dump out specific table data to a
> .csv file so that users can load the file into Excel right away, with
> no manipulation or modification.
> We are running SQL Server 2000. I am a novice SQL user. Any
> suggestions?

Best is probably to set up a job in Agent that uses BCP to bulk out
the data. Do you want the entire table, or only part of it?

You can also try the Export/Import wizard and see what it gives you.
(Never have used it myself, though.)

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||DTS is probably something you want to look at also. Like Erland's
suggestion, you package would be scheduled via SQL Agent.

Thursday, March 8, 2012

Automated loading .CSVs into SQL Server

I am new to SQL Server and would be greatful for any assistance you
may be able to provide.
I have an incoming directory that recieves .csv files are regular
intervals. I need to be able to identify when these files arrive and
then load them into SQL Server into seperate tables overwriting the
current data. I was looking to use DTS, however i have never used it
before.
Could you assist or refer me to any useful sources?
Thank you in advance.Visit at www.sqldts.com
<dipeshpatel316@.gmail.com> wrote in message
news:1170760628.739101.96140@.a34g2000cwb.googlegroups.com...
>I am new to SQL Server and would be greatful for any assistance you
> may be able to provide.
> I have an incoming directory that recieves .csv files are regular
> intervals. I need to be able to identify when these files arrive and
> then load them into SQL Server into seperate tables overwriting the
> current data. I was looking to use DTS, however i have never used it
> before.
> Could you assist or refer me to any useful sources?
> Thank you in advance.
>

Automated loading .CSVs into SQL Server

I am new to SQL Server and would be greatful for any assistance you
may be able to provide.
I have an incoming directory that recieves .csv files are regular
intervals. I need to be able to identify when these files arrive and
then load them into SQL Server into seperate tables overwriting the
current data. I was looking to use DTS, however i have never used it
before.
Could you assist or refer me to any useful sources?
Thank you in advance.
Visit at www.sqldts.com
<dipeshpatel316@.gmail.com> wrote in message
news:1170760628.739101.96140@.a34g2000cwb.googlegro ups.com...
>I am new to SQL Server and would be greatful for any assistance you
> may be able to provide.
> I have an incoming directory that recieves .csv files are regular
> intervals. I need to be able to identify when these files arrive and
> then load them into SQL Server into seperate tables overwriting the
> current data. I was looking to use DTS, however i have never used it
> before.
> Could you assist or refer me to any useful sources?
> Thank you in advance.
>

Automated loading .CSVs into SQL Server

I am new to SQL Server and would be greatful for any assistance you
may be able to provide.
I have an incoming directory that recieves .csv files are regular
intervals. I need to be able to identify when these files arrive and
then load them into SQL Server into seperate tables overwriting the
current data. I was looking to use DTS, however i have never used it
before.
Could you assist or refer me to any useful sources?
Thank you in advance.Visit at www.sqldts.com
<dipeshpatel316@.gmail.com> wrote in message
news:1170760628.739101.96140@.a34g2000cwb.googlegroups.com...
>I am new to SQL Server and would be greatful for any assistance you
> may be able to provide.
> I have an incoming directory that recieves .csv files are regular
> intervals. I need to be able to identify when these files arrive and
> then load them into SQL Server into seperate tables overwriting the
> current data. I was looking to use DTS, however i have never used it
> before.
> Could you assist or refer me to any useful sources?
> Thank you in advance.
>

Wednesday, March 7, 2012

Automate query output to .txt or .csv file

Good day!
What is the easiest most efficient way to output a query to a .txt or .csv?
JPThis depends on you OS (MS-Windows or UNIX or ...) and your DBMS (DB2 or Oracle or ...)
Essentially, in all cases, you may do something like
DBMS "SELECT * FROM table" > file.txt
where "DBMS" is the command to run the DBMS SQL interpreter from the command line.|||Yes, I should probably included that info!

Windows Server 2003
SQL 2000

Thanks for the help!

JP