I have to load around 68 CSV files into one table. I have named the files
1.csv thru 68.csv. Is there a way I can don't have to make 68 packages to
load these. I am not very proficient with VBScriptTry using a global variable for the file name, a Dynamic Properties Task and
an ActiveX Script Task to programmatically loop through and change the name
of the input file for each import.
HTH
Jerry
"XXX" <sa@.nomail.com> wrote in message
news:uzU8pR7vFHA.1168@.TK2MSFTNGP10.phx.gbl...
>I have to load around 68 CSV files into one table. I have named the files
>1.csv thru 68.csv. Is there a way I can don't have to make 68 packages to
>load these. I am not very proficient with VBScript
>|||You can concatenate the files and create a big one to be imported.
This is the help for dos command "copy".
*****
C:\>copy /?
Copies one or more files to another location.
COPY [/D] [/V] [/N] [/Y | /-Y] [/Z] [/A | /B ] source [/A | /B]
[+ source [/A | /B] [+ ...]] [destination [/A | /B]]
source Specifies the file or files to be copied.
/A Indicates an ASCII text file.
/B Indicates a binary file.
/D Allow the destination file to be created decrypted
destination Specifies the directory and/or filename for the new file(s).
/V Verifies that new files are written correctly.
/N Uses short filename, if available, when copying a file with a
non-8dot3 name.
/Y Suppresses prompting to confirm you want to overwrite an
existing destination file.
/-Y Causes prompting to confirm you want to overwrite an
existing destination file.
/Z Copies networked files in restartable mode.
The switch /Y may be preset in the COPYCMD environment variable.
This may be overridden with /-Y on the command line. Default is
to prompt on overwrites unless COPY command is being executed from
within a batch script.
To append files, specify a single file for destination, but multiple files
for source (using wildcards or file1+file2+file3 format).
*****
AMB
"XXX" wrote:
> I have to load around 68 CSV files into one table. I have named the files
> 1.csv thru 68.csv. Is there a way I can don't have to make 68 packages to
> load these. I am not very proficient with VBScript
>
>
Showing posts with label csv. Show all posts
Showing posts with label csv. Show all posts
Friday, March 30, 2012
Load data from excel to sql server table
Hi,
I have data in a Excel spread sheet that has been saved as a csv file.
I need to load this data into a sql server table. What is the best way
to do this. Any ideas?
Thanks in advance.
use DTS Wizard
vt
"db-x" <rashmi.ndeshpande@.gmail.com> wrote in message
news:1164900614.237522.111940@.l39g2000cwd.googlegr oups.com...
> Hi,
> I have data in a Excel spread sheet that has been saved as a csv file.
> I need to load this data into a sql server table. What is the best way
> to do this. Any ideas?
> Thanks in advance.
>
|||Yes DTS or SSIS would be the best choice.
"db-x" <rashmi.ndeshpande@.gmail.com> wrote in message
news:1164900614.237522.111940@.l39g2000cwd.googlegr oups.com...
> Hi,
> I have data in a Excel spread sheet that has been saved as a csv file.
> I need to load this data into a sql server table. What is the best way
> to do this. Any ideas?
> Thanks in advance.
>
|||Thanks a lot.. that does seem to work.. but I need a script or a
program to do that.. what is the sql command that could be used ? I'm
new to DB.. sorry if I'm asking a dumb question :-)
vt wrote:[vbcol=seagreen]
> use DTS Wizard
>
> vt
> "db-x" <rashmi.ndeshpande@.gmail.com> wrote in message
> news:1164900614.237522.111940@.l39g2000cwd.googlegr oups.com...
|||check
OPENDATASOURCE function
vt
"db-x" <rashmi.ndeshpande@.gmail.com> wrote in message
news:1164903796.447484.26940@.f1g2000cwa.googlegrou ps.com...
> Thanks a lot.. that does seem to work.. but I need a script or a
> program to do that.. what is the sql command that could be used ? I'm
> new to DB.. sorry if I'm asking a dumb question :-)
> vt wrote:
>
|||or you can use
OPENROWSET function as well
vt
"db-x" <rashmi.ndeshpande@.gmail.com> wrote in message
news:1164903796.447484.26940@.f1g2000cwa.googlegrou ps.com...
> Thanks a lot.. that does seem to work.. but I need a script or a
> program to do that.. what is the sql command that could be used ? I'm
> new to DB.. sorry if I'm asking a dumb question :-)
> vt wrote:
>
sql
I have data in a Excel spread sheet that has been saved as a csv file.
I need to load this data into a sql server table. What is the best way
to do this. Any ideas?
Thanks in advance.
use DTS Wizard
vt
"db-x" <rashmi.ndeshpande@.gmail.com> wrote in message
news:1164900614.237522.111940@.l39g2000cwd.googlegr oups.com...
> Hi,
> I have data in a Excel spread sheet that has been saved as a csv file.
> I need to load this data into a sql server table. What is the best way
> to do this. Any ideas?
> Thanks in advance.
>
|||Yes DTS or SSIS would be the best choice.
"db-x" <rashmi.ndeshpande@.gmail.com> wrote in message
news:1164900614.237522.111940@.l39g2000cwd.googlegr oups.com...
> Hi,
> I have data in a Excel spread sheet that has been saved as a csv file.
> I need to load this data into a sql server table. What is the best way
> to do this. Any ideas?
> Thanks in advance.
>
|||Thanks a lot.. that does seem to work.. but I need a script or a
program to do that.. what is the sql command that could be used ? I'm
new to DB.. sorry if I'm asking a dumb question :-)
vt wrote:[vbcol=seagreen]
> use DTS Wizard
>
> vt
> "db-x" <rashmi.ndeshpande@.gmail.com> wrote in message
> news:1164900614.237522.111940@.l39g2000cwd.googlegr oups.com...
|||check
OPENDATASOURCE function
vt
"db-x" <rashmi.ndeshpande@.gmail.com> wrote in message
news:1164903796.447484.26940@.f1g2000cwa.googlegrou ps.com...
> Thanks a lot.. that does seem to work.. but I need a script or a
> program to do that.. what is the sql command that could be used ? I'm
> new to DB.. sorry if I'm asking a dumb question :-)
> vt wrote:
>
|||or you can use
OPENROWSET function as well
vt
"db-x" <rashmi.ndeshpande@.gmail.com> wrote in message
news:1164903796.447484.26940@.f1g2000cwa.googlegrou ps.com...
> Thanks a lot.. that does seem to work.. but I need a script or a
> program to do that.. what is the sql command that could be used ? I'm
> new to DB.. sorry if I'm asking a dumb question :-)
> vt wrote:
>
sql
Load data from excel to sql server table
Hi,
I have data in a Excel spread sheet that has been saved as a csv file.
I need to load this data into a sql server table. What is the best way
to do this. Any ideas?
Thanks in advance.use DTS Wizard
vt
"db-x" <rashmi.ndeshpande@.gmail.com> wrote in message
news:1164900614.237522.111940@.l39g2000cwd.googlegroups.com...
> Hi,
> I have data in a Excel spread sheet that has been saved as a csv file.
> I need to load this data into a sql server table. What is the best way
> to do this. Any ideas?
> Thanks in advance.
>|||Yes DTS or SSIS would be the best choice.
"db-x" <rashmi.ndeshpande@.gmail.com> wrote in message
news:1164900614.237522.111940@.l39g2000cwd.googlegroups.com...
> Hi,
> I have data in a Excel spread sheet that has been saved as a csv file.
> I need to load this data into a sql server table. What is the best way
> to do this. Any ideas?
> Thanks in advance.
>|||Thanks a lot.. that does seem to work.. but I need a script or a
program to do that.. what is the sql command that could be used ? I'm
new to DB.. sorry if I'm asking a dumb question :-)
vt wrote:[vbcol=seagreen]
> use DTS Wizard
>
> vt
> "db-x" <rashmi.ndeshpande@.gmail.com> wrote in message
> news:1164900614.237522.111940@.l39g2000cwd.googlegroups.com...|||check
OPENDATASOURCE function
vt
"db-x" <rashmi.ndeshpande@.gmail.com> wrote in message
news:1164903796.447484.26940@.f1g2000cwa.googlegroups.com...
> Thanks a lot.. that does seem to work.. but I need a script or a
> program to do that.. what is the sql command that could be used ? I'm
> new to DB.. sorry if I'm asking a dumb question :-)
> vt wrote:
>|||or you can use
OPENROWSET function as well
vt
"db-x" <rashmi.ndeshpande@.gmail.com> wrote in message
news:1164903796.447484.26940@.f1g2000cwa.googlegroups.com...
> Thanks a lot.. that does seem to work.. but I need a script or a
> program to do that.. what is the sql command that could be used ? I'm
> new to DB.. sorry if I'm asking a dumb question :-)
> vt wrote:
>
I have data in a Excel spread sheet that has been saved as a csv file.
I need to load this data into a sql server table. What is the best way
to do this. Any ideas?
Thanks in advance.use DTS Wizard
vt
"db-x" <rashmi.ndeshpande@.gmail.com> wrote in message
news:1164900614.237522.111940@.l39g2000cwd.googlegroups.com...
> Hi,
> I have data in a Excel spread sheet that has been saved as a csv file.
> I need to load this data into a sql server table. What is the best way
> to do this. Any ideas?
> Thanks in advance.
>|||Yes DTS or SSIS would be the best choice.
"db-x" <rashmi.ndeshpande@.gmail.com> wrote in message
news:1164900614.237522.111940@.l39g2000cwd.googlegroups.com...
> Hi,
> I have data in a Excel spread sheet that has been saved as a csv file.
> I need to load this data into a sql server table. What is the best way
> to do this. Any ideas?
> Thanks in advance.
>|||Thanks a lot.. that does seem to work.. but I need a script or a
program to do that.. what is the sql command that could be used ? I'm
new to DB.. sorry if I'm asking a dumb question :-)
vt wrote:[vbcol=seagreen]
> use DTS Wizard
>
> vt
> "db-x" <rashmi.ndeshpande@.gmail.com> wrote in message
> news:1164900614.237522.111940@.l39g2000cwd.googlegroups.com...|||check
OPENDATASOURCE function
vt
"db-x" <rashmi.ndeshpande@.gmail.com> wrote in message
news:1164903796.447484.26940@.f1g2000cwa.googlegroups.com...
> Thanks a lot.. that does seem to work.. but I need a script or a
> program to do that.. what is the sql command that could be used ? I'm
> new to DB.. sorry if I'm asking a dumb question :-)
> vt wrote:
>|||or you can use
OPENROWSET function as well
vt
"db-x" <rashmi.ndeshpande@.gmail.com> wrote in message
news:1164903796.447484.26940@.f1g2000cwa.googlegroups.com...
> Thanks a lot.. that does seem to work.. but I need a script or a
> program to do that.. what is the sql command that could be used ? I'm
> new to DB.. sorry if I'm asking a dumb question :-)
> vt wrote:
>
Load data from excel to sql server table
Hi,
I have data in a Excel spread sheet that has been saved as a csv file.
I need to load this data into a sql server table. What is the best way
to do this. Any ideas?
Thanks in advance.use DTS Wizard
vt
"db-x" <rashmi.ndeshpande@.gmail.com> wrote in message
news:1164900614.237522.111940@.l39g2000cwd.googlegroups.com...
> Hi,
> I have data in a Excel spread sheet that has been saved as a csv file.
> I need to load this data into a sql server table. What is the best way
> to do this. Any ideas?
> Thanks in advance.
>|||Thanks a lot.. that does seem to work.. but I need a script or a
program to do that.. what is the sql command that could be used ? I'm
new to DB.. sorry if I'm asking a dumb question :-)
vt wrote:
> use DTS Wizard
>
> vt
> "db-x" <rashmi.ndeshpande@.gmail.com> wrote in message
> news:1164900614.237522.111940@.l39g2000cwd.googlegroups.com...
> > Hi,
> >
> > I have data in a Excel spread sheet that has been saved as a csv file.
> > I need to load this data into a sql server table. What is the best way
> > to do this. Any ideas?
> >
> > Thanks in advance.
> >|||Yes DTS or SSIS would be the best choice.
"db-x" <rashmi.ndeshpande@.gmail.com> wrote in message
news:1164900614.237522.111940@.l39g2000cwd.googlegroups.com...
> Hi,
> I have data in a Excel spread sheet that has been saved as a csv file.
> I need to load this data into a sql server table. What is the best way
> to do this. Any ideas?
> Thanks in advance.
>|||check
OPENDATASOURCE function
vt
"db-x" <rashmi.ndeshpande@.gmail.com> wrote in message
news:1164903796.447484.26940@.f1g2000cwa.googlegroups.com...
> Thanks a lot.. that does seem to work.. but I need a script or a
> program to do that.. what is the sql command that could be used ? I'm
> new to DB.. sorry if I'm asking a dumb question :-)
> vt wrote:
>> use DTS Wizard
>>
>> vt
>> "db-x" <rashmi.ndeshpande@.gmail.com> wrote in message
>> news:1164900614.237522.111940@.l39g2000cwd.googlegroups.com...
>> > Hi,
>> >
>> > I have data in a Excel spread sheet that has been saved as a csv file.
>> > I need to load this data into a sql server table. What is the best way
>> > to do this. Any ideas?
>> >
>> > Thanks in advance.
>> >
>|||or you can use
OPENROWSET function as well
vt
"db-x" <rashmi.ndeshpande@.gmail.com> wrote in message
news:1164903796.447484.26940@.f1g2000cwa.googlegroups.com...
> Thanks a lot.. that does seem to work.. but I need a script or a
> program to do that.. what is the sql command that could be used ? I'm
> new to DB.. sorry if I'm asking a dumb question :-)
> vt wrote:
>> use DTS Wizard
>>
>> vt
>> "db-x" <rashmi.ndeshpande@.gmail.com> wrote in message
>> news:1164900614.237522.111940@.l39g2000cwd.googlegroups.com...
>> > Hi,
>> >
>> > I have data in a Excel spread sheet that has been saved as a csv file.
>> > I need to load this data into a sql server table. What is the best way
>> > to do this. Any ideas?
>> >
>> > Thanks in advance.
>> >
>
I have data in a Excel spread sheet that has been saved as a csv file.
I need to load this data into a sql server table. What is the best way
to do this. Any ideas?
Thanks in advance.use DTS Wizard
vt
"db-x" <rashmi.ndeshpande@.gmail.com> wrote in message
news:1164900614.237522.111940@.l39g2000cwd.googlegroups.com...
> Hi,
> I have data in a Excel spread sheet that has been saved as a csv file.
> I need to load this data into a sql server table. What is the best way
> to do this. Any ideas?
> Thanks in advance.
>|||Thanks a lot.. that does seem to work.. but I need a script or a
program to do that.. what is the sql command that could be used ? I'm
new to DB.. sorry if I'm asking a dumb question :-)
vt wrote:
> use DTS Wizard
>
> vt
> "db-x" <rashmi.ndeshpande@.gmail.com> wrote in message
> news:1164900614.237522.111940@.l39g2000cwd.googlegroups.com...
> > Hi,
> >
> > I have data in a Excel spread sheet that has been saved as a csv file.
> > I need to load this data into a sql server table. What is the best way
> > to do this. Any ideas?
> >
> > Thanks in advance.
> >|||Yes DTS or SSIS would be the best choice.
"db-x" <rashmi.ndeshpande@.gmail.com> wrote in message
news:1164900614.237522.111940@.l39g2000cwd.googlegroups.com...
> Hi,
> I have data in a Excel spread sheet that has been saved as a csv file.
> I need to load this data into a sql server table. What is the best way
> to do this. Any ideas?
> Thanks in advance.
>|||check
OPENDATASOURCE function
vt
"db-x" <rashmi.ndeshpande@.gmail.com> wrote in message
news:1164903796.447484.26940@.f1g2000cwa.googlegroups.com...
> Thanks a lot.. that does seem to work.. but I need a script or a
> program to do that.. what is the sql command that could be used ? I'm
> new to DB.. sorry if I'm asking a dumb question :-)
> vt wrote:
>> use DTS Wizard
>>
>> vt
>> "db-x" <rashmi.ndeshpande@.gmail.com> wrote in message
>> news:1164900614.237522.111940@.l39g2000cwd.googlegroups.com...
>> > Hi,
>> >
>> > I have data in a Excel spread sheet that has been saved as a csv file.
>> > I need to load this data into a sql server table. What is the best way
>> > to do this. Any ideas?
>> >
>> > Thanks in advance.
>> >
>|||or you can use
OPENROWSET function as well
vt
"db-x" <rashmi.ndeshpande@.gmail.com> wrote in message
news:1164903796.447484.26940@.f1g2000cwa.googlegroups.com...
> Thanks a lot.. that does seem to work.. but I need a script or a
> program to do that.. what is the sql command that could be used ? I'm
> new to DB.. sorry if I'm asking a dumb question :-)
> vt wrote:
>> use DTS Wizard
>>
>> vt
>> "db-x" <rashmi.ndeshpande@.gmail.com> wrote in message
>> news:1164900614.237522.111940@.l39g2000cwd.googlegroups.com...
>> > Hi,
>> >
>> > I have data in a Excel spread sheet that has been saved as a csv file.
>> > I need to load this data into a sql server table. What is the best way
>> > to do this. Any ideas?
>> >
>> > Thanks in advance.
>> >
>
load csv into SQL Server 2005
I have been pulling my hair out all afternoon trying to figure out an easy
way to import csv files into SQL Server 2005. They are perfmon logs in csv
format with TONS of columns, so creating the table and columns beforehand is
not practical. Isn't there some very easy, straightfoward way to simply
create a table and its columns based up on a csv file import?
thanks in advance,
BillIn SQL Server Managemetn Studio, right click on the database name and
choose Tasks... Import Data. This opens the Import Export Wizard.
Specify a Flat File data source. Give it your .csv file name. If
your csv file has column names in the first line, check that box. Use
Preview to see how it looks, and make whatever adjustments it takes to
make it look right. Keep following the steps, and you should end up
with a new table in your database. It will probably not be exactly
what you want!!! Data types will be a bit screwy, names will probably
not be formatted correctly.
Now script that table so you have a CREATE TABLE command. Edit it
until the names and types are right and make the new table. Then
repeat the process above, but this time in the panel labelled Select
Source and Table Views change the Desitnation to the new table you
created. Take through the rest of the steps and the data should load.
I have simplified things a bit - there are far too many details to go
into here - but the approach should get you where you want to go.
Good luck!
Roy Harvey
Beacon Falls, CT
On Tue, 2 May 2006 16:49:10 -0400, "bu" <bu@.nospam.com> wrote:
>I have been pulling my hair out all afternoon trying to figure out an easy
>way to import csv files into SQL Server 2005. They are perfmon logs in csv
>format with TONS of columns, so creating the table and columns beforehand i
s
>not practical. Isn't there some very easy, straightfoward way to simply
>create a table and its columns based up on a csv file import?
>thanks in advance,
>Bill
>|||Take a look at the Windows utility relog.exe
Linchi
"bu" wrote:
> I have been pulling my hair out all afternoon trying to figure out an easy
> way to import csv files into SQL Server 2005. They are perfmon logs in cs
v
> format with TONS of columns, so creating the table and columns beforehand
is
> not practical. Isn't there some very easy, straightfoward way to simply
> create a table and its columns based up on a csv file import?
> thanks in advance,
> Bill
>
>|||Do you know if that same procedure applies in SQL Server 2005 Express as
well as Standard and the others?
thanks again!
Bill
"Roy Harvey" <roy_harvey@.snet.net> wrote in message
news:06jf529da1ocliljc48nhkihkli7mm5j99@.
4ax.com...[vbcol=seagreen]
> In SQL Server Managemetn Studio, right click on the database name and
> choose Tasks... Import Data. This opens the Import Export Wizard.
> Specify a Flat File data source. Give it your .csv file name. If
> your csv file has column names in the first line, check that box. Use
> Preview to see how it looks, and make whatever adjustments it takes to
> make it look right. Keep following the steps, and you should end up
> with a new table in your database. It will probably not be exactly
> what you want!!! Data types will be a bit screwy, names will probably
> not be formatted correctly.
> Now script that table so you have a CREATE TABLE command. Edit it
> until the names and types are right and make the new table. Then
> repeat the process above, but this time in the panel labelled Select
> Source and Table Views change the Desitnation to the new table you
> created. Take through the rest of the steps and the data should load.
> I have simplified things a bit - there are far too many details to go
> into here - but the approach should get you where you want to go.
> Good luck!
> Roy Harvey
> Beacon Falls, CT
>
> On Tue, 2 May 2006 16:49:10 -0400, "bu" <bu@.nospam.com> wrote:
>
easy[vbcol=seagreen]
csv[vbcol=seagreen]
is[vbcol=seagreen]|||I do not believe it applies to Express, as I do not think Express
comes with SSIS. SSIS is what the Wizard builds.
Roy
On Tue, 2 May 2006 21:26:51 -0400, "me" <me@.nospam.com> wrote:
>Do you know if that same procedure applies in SQL Server 2005 Express as
>well as Standard and the others?
>thanks again!
>Bill
>
>"Roy Harvey" <roy_harvey@.snet.net> wrote in message
> news:06jf529da1ocliljc48nhkihkli7mm5j99@.
4ax.com...
>easy
>csv
>is
>
way to import csv files into SQL Server 2005. They are perfmon logs in csv
format with TONS of columns, so creating the table and columns beforehand is
not practical. Isn't there some very easy, straightfoward way to simply
create a table and its columns based up on a csv file import?
thanks in advance,
BillIn SQL Server Managemetn Studio, right click on the database name and
choose Tasks... Import Data. This opens the Import Export Wizard.
Specify a Flat File data source. Give it your .csv file name. If
your csv file has column names in the first line, check that box. Use
Preview to see how it looks, and make whatever adjustments it takes to
make it look right. Keep following the steps, and you should end up
with a new table in your database. It will probably not be exactly
what you want!!! Data types will be a bit screwy, names will probably
not be formatted correctly.
Now script that table so you have a CREATE TABLE command. Edit it
until the names and types are right and make the new table. Then
repeat the process above, but this time in the panel labelled Select
Source and Table Views change the Desitnation to the new table you
created. Take through the rest of the steps and the data should load.
I have simplified things a bit - there are far too many details to go
into here - but the approach should get you where you want to go.
Good luck!
Roy Harvey
Beacon Falls, CT
On Tue, 2 May 2006 16:49:10 -0400, "bu" <bu@.nospam.com> wrote:
>I have been pulling my hair out all afternoon trying to figure out an easy
>way to import csv files into SQL Server 2005. They are perfmon logs in csv
>format with TONS of columns, so creating the table and columns beforehand i
s
>not practical. Isn't there some very easy, straightfoward way to simply
>create a table and its columns based up on a csv file import?
>thanks in advance,
>Bill
>|||Take a look at the Windows utility relog.exe
Linchi
"bu" wrote:
> I have been pulling my hair out all afternoon trying to figure out an easy
> way to import csv files into SQL Server 2005. They are perfmon logs in cs
v
> format with TONS of columns, so creating the table and columns beforehand
is
> not practical. Isn't there some very easy, straightfoward way to simply
> create a table and its columns based up on a csv file import?
> thanks in advance,
> Bill
>
>|||Do you know if that same procedure applies in SQL Server 2005 Express as
well as Standard and the others?
thanks again!
Bill
"Roy Harvey" <roy_harvey@.snet.net> wrote in message
news:06jf529da1ocliljc48nhkihkli7mm5j99@.
4ax.com...[vbcol=seagreen]
> In SQL Server Managemetn Studio, right click on the database name and
> choose Tasks... Import Data. This opens the Import Export Wizard.
> Specify a Flat File data source. Give it your .csv file name. If
> your csv file has column names in the first line, check that box. Use
> Preview to see how it looks, and make whatever adjustments it takes to
> make it look right. Keep following the steps, and you should end up
> with a new table in your database. It will probably not be exactly
> what you want!!! Data types will be a bit screwy, names will probably
> not be formatted correctly.
> Now script that table so you have a CREATE TABLE command. Edit it
> until the names and types are right and make the new table. Then
> repeat the process above, but this time in the panel labelled Select
> Source and Table Views change the Desitnation to the new table you
> created. Take through the rest of the steps and the data should load.
> I have simplified things a bit - there are far too many details to go
> into here - but the approach should get you where you want to go.
> Good luck!
> Roy Harvey
> Beacon Falls, CT
>
> On Tue, 2 May 2006 16:49:10 -0400, "bu" <bu@.nospam.com> wrote:
>
easy[vbcol=seagreen]
csv[vbcol=seagreen]
is[vbcol=seagreen]|||I do not believe it applies to Express, as I do not think Express
comes with SSIS. SSIS is what the Wizard builds.
Roy
On Tue, 2 May 2006 21:26:51 -0400, "me" <me@.nospam.com> wrote:
>Do you know if that same procedure applies in SQL Server 2005 Express as
>well as Standard and the others?
>thanks again!
>Bill
>
>"Roy Harvey" <roy_harvey@.snet.net> wrote in message
> news:06jf529da1ocliljc48nhkihkli7mm5j99@.
4ax.com...
>easy
>csv
>is
>
load csv into SQL Server 2005
I have been pulling my hair out all afternoon trying to figure out an easy
way to import csv files into SQL Server 2005. They are perfmon logs in csv
format with TONS of columns, so creating the table and columns beforehand is
not practical. Isn't there some very easy, straightfoward way to simply
create a table and its columns based up on a csv file import?
thanks in advance,
BillIn SQL Server Managemetn Studio, right click on the database name and
choose Tasks... Import Data. This opens the Import Export Wizard.
Specify a Flat File data source. Give it your .csv file name. If
your csv file has column names in the first line, check that box. Use
Preview to see how it looks, and make whatever adjustments it takes to
make it look right. Keep following the steps, and you should end up
with a new table in your database. It will probably not be exactly
what you want!!! Data types will be a bit screwy, names will probably
not be formatted correctly.
Now script that table so you have a CREATE TABLE command. Edit it
until the names and types are right and make the new table. Then
repeat the process above, but this time in the panel labelled Select
Source and Table Views change the Desitnation to the new table you
created. Take through the rest of the steps and the data should load.
I have simplified things a bit - there are far too many details to go
into here - but the approach should get you where you want to go.
Good luck!
Roy Harvey
Beacon Falls, CT
On Tue, 2 May 2006 16:49:10 -0400, "bu" <bu@.nospam.com> wrote:
>I have been pulling my hair out all afternoon trying to figure out an easy
>way to import csv files into SQL Server 2005. They are perfmon logs in csv
>format with TONS of columns, so creating the table and columns beforehand is
>not practical. Isn't there some very easy, straightfoward way to simply
>create a table and its columns based up on a csv file import?
>thanks in advance,
>Bill
>|||Take a look at the Windows utility relog.exe
Linchi
"bu" wrote:
> I have been pulling my hair out all afternoon trying to figure out an easy
> way to import csv files into SQL Server 2005. They are perfmon logs in csv
> format with TONS of columns, so creating the table and columns beforehand is
> not practical. Isn't there some very easy, straightfoward way to simply
> create a table and its columns based up on a csv file import?
> thanks in advance,
> Bill
>
>|||Do you know if that same procedure applies in SQL Server 2005 Express as
well as Standard and the others?
thanks again!
Bill
"Roy Harvey" <roy_harvey@.snet.net> wrote in message
news:06jf529da1ocliljc48nhkihkli7mm5j99@.4ax.com...
> In SQL Server Managemetn Studio, right click on the database name and
> choose Tasks... Import Data. This opens the Import Export Wizard.
> Specify a Flat File data source. Give it your .csv file name. If
> your csv file has column names in the first line, check that box. Use
> Preview to see how it looks, and make whatever adjustments it takes to
> make it look right. Keep following the steps, and you should end up
> with a new table in your database. It will probably not be exactly
> what you want!!! Data types will be a bit screwy, names will probably
> not be formatted correctly.
> Now script that table so you have a CREATE TABLE command. Edit it
> until the names and types are right and make the new table. Then
> repeat the process above, but this time in the panel labelled Select
> Source and Table Views change the Desitnation to the new table you
> created. Take through the rest of the steps and the data should load.
> I have simplified things a bit - there are far too many details to go
> into here - but the approach should get you where you want to go.
> Good luck!
> Roy Harvey
> Beacon Falls, CT
>
> On Tue, 2 May 2006 16:49:10 -0400, "bu" <bu@.nospam.com> wrote:
> >I have been pulling my hair out all afternoon trying to figure out an
easy
> >way to import csv files into SQL Server 2005. They are perfmon logs in
csv
> >format with TONS of columns, so creating the table and columns beforehand
is
> >not practical. Isn't there some very easy, straightfoward way to simply
> >create a table and its columns based up on a csv file import?
> >
> >thanks in advance,
> >Bill
> >|||I do not believe it applies to Express, as I do not think Express
comes with SSIS. SSIS is what the Wizard builds.
Roy
On Tue, 2 May 2006 21:26:51 -0400, "me" <me@.nospam.com> wrote:
>Do you know if that same procedure applies in SQL Server 2005 Express as
>well as Standard and the others?
>thanks again!
>Bill
>
>"Roy Harvey" <roy_harvey@.snet.net> wrote in message
>news:06jf529da1ocliljc48nhkihkli7mm5j99@.4ax.com...
>> In SQL Server Managemetn Studio, right click on the database name and
>> choose Tasks... Import Data. This opens the Import Export Wizard.
>> Specify a Flat File data source. Give it your .csv file name. If
>> your csv file has column names in the first line, check that box. Use
>> Preview to see how it looks, and make whatever adjustments it takes to
>> make it look right. Keep following the steps, and you should end up
>> with a new table in your database. It will probably not be exactly
>> what you want!!! Data types will be a bit screwy, names will probably
>> not be formatted correctly.
>> Now script that table so you have a CREATE TABLE command. Edit it
>> until the names and types are right and make the new table. Then
>> repeat the process above, but this time in the panel labelled Select
>> Source and Table Views change the Desitnation to the new table you
>> created. Take through the rest of the steps and the data should load.
>> I have simplified things a bit - there are far too many details to go
>> into here - but the approach should get you where you want to go.
>> Good luck!
>> Roy Harvey
>> Beacon Falls, CT
>>
>> On Tue, 2 May 2006 16:49:10 -0400, "bu" <bu@.nospam.com> wrote:
>> >I have been pulling my hair out all afternoon trying to figure out an
>easy
>> >way to import csv files into SQL Server 2005. They are perfmon logs in
>csv
>> >format with TONS of columns, so creating the table and columns beforehand
>is
>> >not practical. Isn't there some very easy, straightfoward way to simply
>> >create a table and its columns based up on a csv file import?
>> >
>> >thanks in advance,
>> >Bill
>> >
>
way to import csv files into SQL Server 2005. They are perfmon logs in csv
format with TONS of columns, so creating the table and columns beforehand is
not practical. Isn't there some very easy, straightfoward way to simply
create a table and its columns based up on a csv file import?
thanks in advance,
BillIn SQL Server Managemetn Studio, right click on the database name and
choose Tasks... Import Data. This opens the Import Export Wizard.
Specify a Flat File data source. Give it your .csv file name. If
your csv file has column names in the first line, check that box. Use
Preview to see how it looks, and make whatever adjustments it takes to
make it look right. Keep following the steps, and you should end up
with a new table in your database. It will probably not be exactly
what you want!!! Data types will be a bit screwy, names will probably
not be formatted correctly.
Now script that table so you have a CREATE TABLE command. Edit it
until the names and types are right and make the new table. Then
repeat the process above, but this time in the panel labelled Select
Source and Table Views change the Desitnation to the new table you
created. Take through the rest of the steps and the data should load.
I have simplified things a bit - there are far too many details to go
into here - but the approach should get you where you want to go.
Good luck!
Roy Harvey
Beacon Falls, CT
On Tue, 2 May 2006 16:49:10 -0400, "bu" <bu@.nospam.com> wrote:
>I have been pulling my hair out all afternoon trying to figure out an easy
>way to import csv files into SQL Server 2005. They are perfmon logs in csv
>format with TONS of columns, so creating the table and columns beforehand is
>not practical. Isn't there some very easy, straightfoward way to simply
>create a table and its columns based up on a csv file import?
>thanks in advance,
>Bill
>|||Take a look at the Windows utility relog.exe
Linchi
"bu" wrote:
> I have been pulling my hair out all afternoon trying to figure out an easy
> way to import csv files into SQL Server 2005. They are perfmon logs in csv
> format with TONS of columns, so creating the table and columns beforehand is
> not practical. Isn't there some very easy, straightfoward way to simply
> create a table and its columns based up on a csv file import?
> thanks in advance,
> Bill
>
>|||Do you know if that same procedure applies in SQL Server 2005 Express as
well as Standard and the others?
thanks again!
Bill
"Roy Harvey" <roy_harvey@.snet.net> wrote in message
news:06jf529da1ocliljc48nhkihkli7mm5j99@.4ax.com...
> In SQL Server Managemetn Studio, right click on the database name and
> choose Tasks... Import Data. This opens the Import Export Wizard.
> Specify a Flat File data source. Give it your .csv file name. If
> your csv file has column names in the first line, check that box. Use
> Preview to see how it looks, and make whatever adjustments it takes to
> make it look right. Keep following the steps, and you should end up
> with a new table in your database. It will probably not be exactly
> what you want!!! Data types will be a bit screwy, names will probably
> not be formatted correctly.
> Now script that table so you have a CREATE TABLE command. Edit it
> until the names and types are right and make the new table. Then
> repeat the process above, but this time in the panel labelled Select
> Source and Table Views change the Desitnation to the new table you
> created. Take through the rest of the steps and the data should load.
> I have simplified things a bit - there are far too many details to go
> into here - but the approach should get you where you want to go.
> Good luck!
> Roy Harvey
> Beacon Falls, CT
>
> On Tue, 2 May 2006 16:49:10 -0400, "bu" <bu@.nospam.com> wrote:
> >I have been pulling my hair out all afternoon trying to figure out an
easy
> >way to import csv files into SQL Server 2005. They are perfmon logs in
csv
> >format with TONS of columns, so creating the table and columns beforehand
is
> >not practical. Isn't there some very easy, straightfoward way to simply
> >create a table and its columns based up on a csv file import?
> >
> >thanks in advance,
> >Bill
> >|||I do not believe it applies to Express, as I do not think Express
comes with SSIS. SSIS is what the Wizard builds.
Roy
On Tue, 2 May 2006 21:26:51 -0400, "me" <me@.nospam.com> wrote:
>Do you know if that same procedure applies in SQL Server 2005 Express as
>well as Standard and the others?
>thanks again!
>Bill
>
>"Roy Harvey" <roy_harvey@.snet.net> wrote in message
>news:06jf529da1ocliljc48nhkihkli7mm5j99@.4ax.com...
>> In SQL Server Managemetn Studio, right click on the database name and
>> choose Tasks... Import Data. This opens the Import Export Wizard.
>> Specify a Flat File data source. Give it your .csv file name. If
>> your csv file has column names in the first line, check that box. Use
>> Preview to see how it looks, and make whatever adjustments it takes to
>> make it look right. Keep following the steps, and you should end up
>> with a new table in your database. It will probably not be exactly
>> what you want!!! Data types will be a bit screwy, names will probably
>> not be formatted correctly.
>> Now script that table so you have a CREATE TABLE command. Edit it
>> until the names and types are right and make the new table. Then
>> repeat the process above, but this time in the panel labelled Select
>> Source and Table Views change the Desitnation to the new table you
>> created. Take through the rest of the steps and the data should load.
>> I have simplified things a bit - there are far too many details to go
>> into here - but the approach should get you where you want to go.
>> Good luck!
>> Roy Harvey
>> Beacon Falls, CT
>>
>> On Tue, 2 May 2006 16:49:10 -0400, "bu" <bu@.nospam.com> wrote:
>> >I have been pulling my hair out all afternoon trying to figure out an
>easy
>> >way to import csv files into SQL Server 2005. They are perfmon logs in
>csv
>> >format with TONS of columns, so creating the table and columns beforehand
>is
>> >not practical. Isn't there some very easy, straightfoward way to simply
>> >create a table and its columns based up on a csv file import?
>> >
>> >thanks in advance,
>> >Bill
>> >
>
Friday, March 23, 2012
Lists
Hello... Is there an easy way to get a csv or txt list of all contraints? As
well a list of indices for a given database?
Thanks in advance
AnthonyWhat version of SQL Server are you concerned with?
--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
"Anthony Nystrom" <AnthonyNystrom@.discussions.microsoft.com> wrote in
message news:73C80B18-F6DD-43D4-9326-CC62478D5A23@.microsoft.com...
> Hello... Is there an easy way to get a csv or txt list of all contraints?
> As
> well a list of indices for a given database?
> Thanks in advance
> Anthony|||SQL Server 2000
Thanks,
Anthony
"Arnie Rowland" wrote:
> What version of SQL Server are you concerned with?
> --
> Arnie Rowland, Ph.D.
> Westwood Consulting, Inc
> Most good judgment comes from experience.
> Most experience comes from bad judgment.
> - Anonymous
>
> "Anthony Nystrom" <AnthonyNystrom@.discussions.microsoft.com> wrote in
> message news:73C80B18-F6DD-43D4-9326-CC62478D5A23@.microsoft.com...
> > Hello... Is there an easy way to get a csv or txt list of all contraints?
> > As
> > well a list of indices for a given database?
> >
> > Thanks in advance
> >
> > Anthony
>
>
well a list of indices for a given database?
Thanks in advance
AnthonyWhat version of SQL Server are you concerned with?
--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
"Anthony Nystrom" <AnthonyNystrom@.discussions.microsoft.com> wrote in
message news:73C80B18-F6DD-43D4-9326-CC62478D5A23@.microsoft.com...
> Hello... Is there an easy way to get a csv or txt list of all contraints?
> As
> well a list of indices for a given database?
> Thanks in advance
> Anthony|||SQL Server 2000
Thanks,
Anthony
"Arnie Rowland" wrote:
> What version of SQL Server are you concerned with?
> --
> Arnie Rowland, Ph.D.
> Westwood Consulting, Inc
> Most good judgment comes from experience.
> Most experience comes from bad judgment.
> - Anonymous
>
> "Anthony Nystrom" <AnthonyNystrom@.discussions.microsoft.com> wrote in
> message news:73C80B18-F6DD-43D4-9326-CC62478D5A23@.microsoft.com...
> > Hello... Is there an easy way to get a csv or txt list of all contraints?
> > As
> > well a list of indices for a given database?
> >
> > Thanks in advance
> >
> > Anthony
>
>
Lists
Hello... Is there an easy way to get a csv or txt list of all contraints? As
well a list of indices for a given database?
Thanks in advance
AnthonyWhat version of SQL Server are you concerned with?
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
"Anthony Nystrom" <AnthonyNystrom@.discussions.microsoft.com> wrote in
message news:73C80B18-F6DD-43D4-9326-CC62478D5A23@.microsoft.com...
> Hello... Is there an easy way to get a csv or txt list of all contraints?
> As
> well a list of indices for a given database?
> Thanks in advance
> Anthony|||SQL Server 2000
Thanks,
Anthony
"Arnie Rowland" wrote:
> What version of SQL Server are you concerned with?
> --
> Arnie Rowland, Ph.D.
> Westwood Consulting, Inc
> Most good judgment comes from experience.
> Most experience comes from bad judgment.
> - Anonymous
>
> "Anthony Nystrom" <AnthonyNystrom@.discussions.microsoft.com> wrote in
> message news:73C80B18-F6DD-43D4-9326-CC62478D5A23@.microsoft.com...
>
>
well a list of indices for a given database?
Thanks in advance
AnthonyWhat version of SQL Server are you concerned with?
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
"Anthony Nystrom" <AnthonyNystrom@.discussions.microsoft.com> wrote in
message news:73C80B18-F6DD-43D4-9326-CC62478D5A23@.microsoft.com...
> Hello... Is there an easy way to get a csv or txt list of all contraints?
> As
> well a list of indices for a given database?
> Thanks in advance
> Anthony|||SQL Server 2000
Thanks,
Anthony
"Arnie Rowland" wrote:
> What version of SQL Server are you concerned with?
> --
> Arnie Rowland, Ph.D.
> Westwood Consulting, Inc
> Most good judgment comes from experience.
> Most experience comes from bad judgment.
> - Anonymous
>
> "Anthony Nystrom" <AnthonyNystrom@.discussions.microsoft.com> wrote in
> message news:73C80B18-F6DD-43D4-9326-CC62478D5A23@.microsoft.com...
>
>
Subscribe to:
Posts (Atom)