Showing posts with label status. Show all posts
Showing posts with label status. Show all posts

Friday, February 17, 2012

DTS Transform

I get this error:

column 6 ('CheckDate', dbType_dbtimestamp), status 6: dat over flow
invalid character value for cast specification

Here is the sql generated :

CREATE TABLE [DMS].[dbo].[Master] (
[Date_Entered] smalldatetime NULL,
[Initials] nvarchar (10) NULL,
[VendorName] nvarchar (50) NULL,
[CheckNum] nvarchar (20) NULL,
[ExpenseType] nvarchar (10) NULL,
[CheckDate] smalldatetime NULL,
[CheckAmount] money NULL
)

IM guessing i need to change date_enteed type or do a cast

any help pls

!~<Mis there anybody who has any idea about this?|||Is this the table DTS is inserting into, or is it actually trying to create the table? If it's trying to insert, change the CheckDate to datetime instead of smalldatetime and see if that fixes it.|||smalldatetime to datetime will not make a difference if value in the source is not a date. I'd suggest to change CheckDate and possibly Dtae_Entered to varchar(25), but add 2 calculated fields that would convert a valid date to date or NULL if it's not. Put them at the end of the table and do not insert anything into them (it'll fail if you try).

CREATE TABLE [DMS].[dbo].[Master] (
[Date_Entered] varchar(25) NULL,
[Initials] nvarchar (10) NULL,
[VendorName] nvarchar (50) NULL,
[CheckNum] nvarchar (20) NULL,
[ExpenseType] nvarchar (10) NULL,
[CheckDate] varchar(25) NULL,
[CheckAmount] money NULL,
[Date_Entered_Calc] as case when isdate([Date_Entered])=1 then cast([Date_Entered] as datetime) else cast(null as datetime) end,
[CheckDate_Calc] as case when isdate([CheckDate])=1 then cast([CheckDate] as datetime) else cast(null as datetime) end
)

Wednesday, February 15, 2012

DTS to SSIS ExecutionStatus Inactive

Hi ,

I have code in SQL Server 2000 (DTS). what is same code to inactive execution status in SSIS

If returnValue <> "" Then

DTSPackage.Steps("DTSStep_DTSDataPumpTask_2").ExecutionStatus = DTSStepExecStat_Inactive

Else

DTSPackage.Steps("DTSStep_DTSDataPumpTask_3").ExecutionStatus = DTSStepExecStat_Inactive

End If

Thanks,

Raja

You could try using either an expression on your precedent constraint in the control flow or a conditional split in the data flow.

|||

Hi Martin,

Thanks for your reply.

I declare global variable returnValue as Boolean default false and set Precedence Constraint property

EvalOP = ExpressionAndConstraintand Expression = @.returnValue == Trueit is working fine.

Thanks,

Raja

Raja