dbTalk Databases Forums  

data transfer from .csv file to sql server 2000

comp.databases.ms-sqlserver comp.databases.ms-sqlserver


Discuss data transfer from .csv file to sql server 2000 in the comp.databases.ms-sqlserver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
sachin shah
 
Posts: n/a

Default data transfer from .csv file to sql server 2000 - 08-15-2007 , 11:35 PM






Hi All,

1. i want to transfer the .csv file data into sql server table, i
tried with the DTS but while creating DSN it not prompt to attech
the .csv file. give me the proper steps to perform the data
transfer...

2. i want result of my query into excel or text file by using the sql
query( like Select * from employee where emp_salary>10000 to 'c:
\emp.xls).i know the other way right click into query analyzer window
and select option result to file, but want the result by using SQL
query.....

Quote:
From Sachin Shah


Reply With Quote
  #2  
Old   
stephen
 
Posts: n/a

Default Re: data transfer from .csv file to sql server 2000 - 08-16-2007 , 03:48 AM






On Aug 16, 5:35 am, sachin shah <sachin28... (AT) gmail (DOT) com> wrote:
Quote:
Hi All,

1. i want to transfer the .csv file data into sql server table, i
tried with the DTS but while creating DSN it not prompt to attech
the .csv file. give me the proper steps to perform the data
transfer...

Not sure what DSN is but if you run the Import/Export utility you can
select Text File as the data source. Then select the text file you
want to import and follow the steps to select the table to import
into, column mappings, etc.


Quote:
2. i want result of my query into excel or text file by using the sql
query( like Select * from employee where emp_salary>10000 to 'c:
\emp.xls).i know the other way right click into query analyzer window
and select option result to file, but want the result by using SQL
query.....
You could run the query from the command line using bcp or osql
(isql?) and specify an output file to contain the results.

Quote:
From Sachin Shah



Reply With Quote
  #3  
Old   
sachin shah
 
Posts: n/a

Default Re: data transfer from .csv file to sql server 2000 - 08-16-2007 , 04:16 AM



On Aug 16, 1:48 pm, stephen <m0604... (AT) googlemail (DOT) com> wrote:
Quote:
On Aug 16, 5:35 am, sachin shah <sachin28... (AT) gmail (DOT) com> wrote:

Hi All,

1. i want to transfer the .csv file data into sql server table, i
tried with the DTS but while creating DSN it not prompt to attech
the .csv file. give me the proper steps to perform the data
transfer...

Not sure what DSN is but if you run the Import/Export utility you can
select Text File as the data source. Then select the text file you
want to import and follow the steps to select the table to import
into, column mappings, etc.

2. i want result of my query into excel or text file by using the sql
query( like Select * from employee where emp_salary>10000 to 'c:
\emp.xls).i know the other way right click into query analyzer window
and select option result to file, but want the result by using SQL
query.....

You could run the query from the command line using bcp or osql
(isql?) and specify an output file to contain the results.





From Sachin Shah- Hide quoted text -

- Show quoted text -
====

my first query is solved thanxs...

but second one is i don't understand...



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.