473,398 Members | 2,393 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Exporting data

Hi, I have a few legacy systems to which I need to export data from
SQL server 2000.
The export should be done every one or two hours, so there's much time
for little data ;-)

My first idea to do this was using a batch file. I found bcp.exe,
which could work - however, I have text data in the table, and this is
not quoted by bcp.exe. Parsing the resulting data is, to say the
least, difficult...

Can someone please suggest a way to do this task?

Thanks,
Gerd
Nov 7 '08 #1
2 1926
On Nov 7, 10:04 am, GerdB...@gmail.com wrote:
Hi, I have a few legacy systems to which I need to export data from
SQL server 2000.
The export should be done every one or two hours, so there's much time
for little data ;-)

My first idea to do this was using a batch file. I found bcp.exe,
which could work - however, I have text data in the table, and this is
not quoted by bcp.exe. Parsing the resulting data is, to say the
least, difficult...

Can someone please suggest a way to do this task?

Thanks,
Gerd

I use bcp, and point it at a view on the server (sql2005), and this
view on the server puts multiple fields with delimiters together into
one record / field, and this lets me choose my output delimiter.

like

create view EXPORT_VIEW as select NAME + '|' + ADDRESS + '|' + CITY +
'|' + STATE from CUSTOMER_TABLE

and then bcp that. This lets me use the vertical pipe as a delimiter.

At least on 2005, bcp has many options and some of these go into a
spec file, but I've been happy just doing the field delimiters in sql.
Nov 7 '08 #2
On 7 Nov., 20:22, patrick...@yahoo.com wrote:
On Nov 7, 10:04 am, GerdB...@gmail.com wrote:
[...]
>
like

create view EXPORT_VIEW as select NAME + '|' + ADDRESS + '|' + CITY +
'|' + STATE from CUSTOMER_TABLE

and then bcp that. This lets me use the vertical pipe as a delimiter.
[...]

Great! That's exactly what I needed... Thanks!

-gerd

Nov 11 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Angel Cat | last post by:
I'm exporting a large file from a large Production database (SQL). Users are currently updating and inserting new records. Does the export take a snapshot of the data when it starts ? or will...
3
by: sridevi | last post by:
Hello How to export data from ms-access database to excel worksheet using ASP. mainly i need to export data to multiple worksheets. it is very urgent to us. i have a sample code which works...
4
by: D | last post by:
I've created a report with many subreports of aggregate data. I want my client to be able to export this data to Excel to make her charts, etc. Only one problem: one of the fields is a "SchoolYear"...
2
by: pmud | last post by:
Hi, I am exporting data from an EDITABLE DATA GRID EXCEL. But the 1st column in data grid is Edit Column. I want to display all columns in Excel except for the Edit column. The following...
2
by: bienwell | last post by:
Hi, I have a question about exporting data from datagrid control into Excel file in ASP.NET. On my Web page, I have a linkbutton "Export data". This link will call a Sub Function to perform...
2
by: Snozz | last post by:
The short of it: If you needed to import a CSV file of a certain structure on a regular basis(say 32 csv files, each to one a table in 32 databases), what would be your first instinct on how to...
2
by: Mux | last post by:
I am facing the following problem while exporting data to Word. The current implementation is as described below: I have a JSP file which has a link that enables you to export the data to Word....
6
by: sara | last post by:
I have what I think is a little strange...I have to get data from our payroll system into a specific format (fixed record length) as a .txt or .prn file only to upload to our 401k custodian. I...
0
by: =?Utf-8?B?ZGVuIDIwMDU=?= | last post by:
hi, I trying to export data display on a gridview that supports any language (like chinese, japanese, thai, french) shown here is chinese only. There is no problem exporting english language...
2
by: billelev | last post by:
Hi there, My question does not concern the exporting of data to CSV so much as the format of the exported data. The data to be exported consists of a time series of prices for a number of assets....
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.