dbTalk Databases Forums  

Importing and converting packed decimal to unpacked decimal

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


Discuss Importing and converting packed decimal to unpacked decimal in the microsoft.public.sqlserver.dts forum.



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

Default Importing and converting packed decimal to unpacked decimal - 09-25-2004 , 04:32 PM






I have some data that I would like to use DTS to import to a MS SQL Server
table. Two of the fields contain packed-decimal data. Does an easy way exist
to transform the fields into unpacked (signed) decimal during the import? Can
anyone please point me to some documentation that would give some idea as to
how to proceed. I guess I could write a COBOL program to do the conversion,
but would like to be able to do it directly as the data is imported. My
thinking is that it would require the use of a VB script to do the
transformation? Any pointers on what that script might contain?

--
Thanks, Mike.


Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Importing and converting packed decimal to unpacked decimal - 09-26-2004 , 02:06 AM






Yep

To get from packed decimal to unpacked values you could use an Active Script
transform as there is no built in function to do this I know of.




--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.Konesans.com


"Mike Vanecek" <MikeV99 (AT) privacy (DOT) net> wrote

Quote:
I have some data that I would like to use DTS to import to a MS SQL Server
table. Two of the fields contain packed-decimal data. Does an easy way
exist
to transform the fields into unpacked (signed) decimal during the import?
Can
anyone please point me to some documentation that would give some idea as
to
how to proceed. I guess I could write a COBOL program to do the
conversion,
but would like to be able to do it directly as the data is imported. My
thinking is that it would require the use of a VB script to do the
transformation? Any pointers on what that script might contain?

--
Thanks, Mike.




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.