dbTalk Databases Forums  

Parsing the long char column in SQL Server

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Parsing the long char column in SQL Server in the microsoft.public.sqlserver.dts forum.



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

Default Parsing the long char column in SQL Server - 11-06-2003 , 10:48 AM






I just received a table migrated from the ServiceCenter.
There is a long char column, which is in fact a series of
column in ServiceCenter data.

How can I parse it into additional fields in SQL Server; or
is there any instruction/guideline, from which a utility
tool, e.g. Crystal Report, can parse the extracted data
while the long char column is migrating to SQL Server?

Can I do this task in DTS?

Thanks in advance.

Jeffrey



Reply With Quote
  #2  
Old   
Darren Green
 
Posts: n/a

Default Re: Parsing the long char column in SQL Server - 11-06-2003 , 01:15 PM






In article <00a101c3a485$cbd18f20$a301280a (AT) phx (DOT) gbl>, Jeffrey
<jwang (AT) dot (DOT) state.tx.us> writes
Quote:
I just received a table migrated from the ServiceCenter.
There is a long char column, which is in fact a series of
column in ServiceCenter data.

How can I parse it into additional fields in SQL Server; or
is there any instruction/guideline, from which a utility
tool, e.g. Crystal Report, can parse the extracted data
while the long char column is migrating to SQL Server?

Can I do this task in DTS?

Thanks in advance.

Jeffrey

If you have delimiters or a fixed width format the simplest way would be
just use T-SQL, and write a
INSERT NewTable (COl1A, ...)
SELECT LEFT(COl1, 1)....

You could also use a DTS package. Use the DataPump task to transfer
between the old and new table, and use an ActiveX Script Transform on
the column in question. You can then split the column or use associated
string manipulation commands in VBS to split the data and assign it the
multiple destination columns.


--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



Reply With Quote
  #3  
Old   
Jeffrey
 
Posts: n/a

Default Re: Parsing the long char column in SQL Server - 11-06-2003 , 02:22 PM



Where can I find the article <00a101c3a485$cbd18f20
$a301280a (AT) phx (DOT) gbl>? A web site at www.phx.gbl or send a
email?

Thanks,
Jeffrey
Quote:
-----Original Message-----
In article <00a101c3a485$cbd18f20$a301280a (AT) phx (DOT) gbl>,
Jeffrey
jwang (AT) dot (DOT) state.tx.us> writes
I just received a table migrated from the ServiceCenter.
There is a long char column, which is in fact a series of
column in ServiceCenter data.

How can I parse it into additional fields in SQL Server;
or
is there any instruction/guideline, from which a utility
tool, e.g. Crystal Report, can parse the extracted data
while the long char column is migrating to SQL Server?

Can I do this task in DTS?

Thanks in advance.

Jeffrey


If you have delimiters or a fixed width format the
simplest way would be
just use T-SQL, and write a
INSERT NewTable (COl1A, ...)
SELECT LEFT(COl1, 1)....

You could also use a DTS package. Use the DataPump task
to transfer
between the old and new table, and use an ActiveX Script
Transform on
the column in question. You can then split the column or
use associated
string manipulation commands in VBS to split the data and
assign it the
multiple destination columns.


--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server
professionals
http://www.sqlpass.org

.


Reply With Quote
  #4  
Old   
Darren Green
 
Posts: n/a

Default Re: Parsing the long char column in SQL Server - 11-06-2003 , 02:48 PM



In article <09d201c3a4a3$a6055e20$a001280a (AT) phx (DOT) gbl>, Jeffrey
<jwang (AT) dot (DOT) state.tx.us> writes
Quote:
Where can I find the article <00a101c3a485$cbd18f20
$a301280a (AT) phx (DOT) gbl>? A web site at www.phx.gbl or send a
email?

Thanks,
Jeffrey
What does that mean? May be you cannot see the message so I'll try
again, but maybe you won't see this either. Maybe nobody else is really
out there...


If you have delimiters or a fixed width format the simplest way would be
just use T-SQL, and write a
INSERT NewTable (COl1A, ...)
SELECT LEFT(COl1, 1)....

You could also use a DTS package. Use the DataPump task to transfer
between the old and new table, and use an ActiveX Script Transform on
the column in question. You can then split the column or use associated
string manipulation commands in VBS to split the data and assign it the
multiple destination columns.


--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



Reply With Quote
  #5  
Old   
Jeffrey
 
Posts: n/a

Default Re: Parsing the long char column in SQL Server - 11-06-2003 , 03:57 PM



I can read your reply message, "If you have delimiters
or ........." But I can not understand "article
<00a101c3a485$cbd18f20$a301280a (AT) phx (DOT) gbl>, Jeffrey" at the
begining of your email. I thought you want me to read an
article in @phx.gbl.

Thanks,
Jeffrey

Quote:
-----Original Message-----
In article <09d201c3a4a3$a6055e20$a001280a (AT) phx (DOT) gbl>,
Jeffrey
jwang (AT) dot (DOT) state.tx.us> writes
Where can I find the article <00a101c3a485$cbd18f20
$a301280a (AT) phx (DOT) gbl>? A web site at www.phx.gbl or send a
email?

Thanks,
Jeffrey

What does that mean? May be you cannot see the message so
I'll try
again, but maybe you won't see this either. Maybe nobody
else is really
out there...


If you have delimiters or a fixed width format the
simplest way would be
just use T-SQL, and write a
INSERT NewTable (COl1A, ...)
SELECT LEFT(COl1, 1)....

You could also use a DTS package. Use the DataPump task
to transfer
between the old and new table, and use an ActiveX Script
Transform on
the column in question. You can then split the column or
use associated
string manipulation commands in VBS to split the data and
assign it the
multiple destination columns.


--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server
professionals
http://www.sqlpass.org

.


Reply With Quote
  #6  
Old   
Darren Green
 
Posts: n/a

Default Re: Parsing the long char column in SQL Server - 11-06-2003 , 04:14 PM



In article <03b901c3a4b0$e9025770$a401280a (AT) phx (DOT) gbl>, Jeffrey
<jwang (AT) dot (DOT) state.tx.us> writes
Quote:
I can read your reply message, "If you have delimiters
or ........." But I can not understand "article
00a101c3a485$cbd18f20$a301280a (AT) phx (DOT) gbl>, Jeffrey" at the
begining of your email. I thought you want me to read an
article in @phx.gbl.

Thanks,
Jeffrey

The beginning, e.g.

In article <03b901c3a4b0$e9025770$a401280a (AT) phx (DOT) gbl>, Jeffrey
<jwang (AT) dot (DOT) state.tx.us> writes

is just my news reader's default reply style. Nothing to worry about.

Cheers

--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



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.