I'm trying to convert numeric dates on the AS400 to smalldatetime in
SQL. I'm able to customize to match format but when I save the
tranformation I get the following error. I don't know why they sould
let you customize the field if you cant convert. Any ideas?
"Error Description: TranformationDateTimeString('X') column pair 1
(source column 'Y'(DBTYPE_NUMERIC), destination column 'Z'
(DBTYPE_DBTIMESTAMP)): Cannot convert source datatype to datetime
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!If this is an import, try dumping it to a temp table then let the MS drivers
do the job natively. What drivers are you using for this? client access?
****************************************
******************************
Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET
resources...
Showing posts with label numeric. Show all posts
Showing posts with label numeric. Show all posts
Friday, March 9, 2012
Sunday, February 26, 2012
DTS load
New to SQL Server :(
load a txt file to SQL
there is a field, data type is numeric (13,6).
But in the file, it is like this: 9999999999999
How do I add the decimal points to make it: 9999999.999999??
Thanks a lotOriginally posted by qingbo
New to SQL Server :(
load a txt file to SQL
there is a field, data type is numeric (13,6).
But in the file, it is like this: 9999999999999
How do I add the decimal points to make it: 9999999.999999??
Thanks a lot
Add an Execute SQL Task object to the package and insert code something similar to this:
UPDATE tablename
SET ColumnName = ColumnName / 1000000.00
Where ColumnName is the numeric(13, 6) column defined in the table.
Hope this helps.
load a txt file to SQL
there is a field, data type is numeric (13,6).
But in the file, it is like this: 9999999999999
How do I add the decimal points to make it: 9999999.999999??
Thanks a lotOriginally posted by qingbo
New to SQL Server :(
load a txt file to SQL
there is a field, data type is numeric (13,6).
But in the file, it is like this: 9999999999999
How do I add the decimal points to make it: 9999999.999999??
Thanks a lot
Add an Execute SQL Task object to the package and insert code something similar to this:
UPDATE tablename
SET ColumnName = ColumnName / 1000000.00
Where ColumnName is the numeric(13, 6) column defined in the table.
Hope this helps.
Friday, February 17, 2012
DTS Import of a text file
I have created a DTS that imports a text file to by data table. I get
errors when ever I run this since there are fields in the table that
are numeric. I understand that I need to create an activeX script to
import those fields. DOes anyone have any guidance?Service,
My suggestion is not to import data directly into a production table.
Instead, import it into a temp table, which is made up of all varchar
fields. Then, call a stored procedure (as the next step in your DTS
package) to massage the data, do error checking on the data, and then do
inserts into your production data. You get much more control this way.
And, if your DTS package fails on the import, you haven't compromised your
production data.
Also, you may want to take a look at our videos on DTS packages as
www.TechnicalVideos.net. There is an example in there that does just that,
plus lots of performance and optimization tweaks for SQL Server 2000.
Hope this helps.
Best regards,
Chuck Conover
www.TechnicalVideos.net
errors when ever I run this since there are fields in the table that
are numeric. I understand that I need to create an activeX script to
import those fields. DOes anyone have any guidance?Service,
My suggestion is not to import data directly into a production table.
Instead, import it into a temp table, which is made up of all varchar
fields. Then, call a stored procedure (as the next step in your DTS
package) to massage the data, do error checking on the data, and then do
inserts into your production data. You get much more control this way.
And, if your DTS package fails on the import, you haven't compromised your
production data.
Also, you may want to take a look at our videos on DTS packages as
www.TechnicalVideos.net. There is an example in there that does just that,
plus lots of performance and optimization tweaks for SQL Server 2000.
Hope this helps.
Best regards,
Chuck Conover
www.TechnicalVideos.net
"Service Tech" <naughtonservice@.yahoo.com> wrote in message
news:b37bc818.0401270721.6d425d57@.posting.google.c om...
> I have created a DTS that imports a text file to by data table. I get
> errors when ever I run this since there are fields in the table that
> are numeric. I understand that I need to create an activeX script to
> import those fields. DOes anyone have any guidance?
Subscribe to:
Posts (Atom)