SQL Server Performance

SSIS Expression Builder Add Line Break like paragraph format & Adding GetDate() and Add Image Examples

Discussion in 'SQL Server 2005 Integration Services' started by Ismailc, Aug 8, 2007.

  1. Ismailc New Member

    Hi, I need help on the following.
    SSIS Expression Builder Add Line Break like paragraph format.
    1. "Hi" + BREAK? +"Attached find the Daily Sales Report: " + RTRIM( @[User::period] )
    SSIS Expression Builder Adding GetDate() and Add Image Examples
    2. GETDATE() ?
    3. DAY( @[System::CreationDate] ) ?
    4. (DT_IMAGE)?
    Please any examples, could not get off the net.
  2. ranjitjain New Member

    For line break you can use char(13).
    use getdate() to set the value of a variable to current date.
    so use getdate() by assigning it to a datetime variable instead.
  3. Ismailc New Member

    Thanks for the reply, I do not know what i'm doing - no idea.
    1. Line break do you have example.
    2. DAY( @[User::RunDate] ) - my variable is stored as an int32 so I get the error cannot convert System.Int32 to System.String.
    mentions using DT_14
    I also tried Casting - Cast(@[User::RunDate] as char(10)) or (DT_DBDATE)(@[User::RunDate] but sill no luck.
    My variable is int32: 20070101
    I would like to show as: 1 Januaray 2007 and 01/01/2007
  4. ranjitjain New Member

    I have not used expression builder much, but in sql server one can use char(13) for line break.
    Also I think in expression builder you can use some vb.net functions, then to convert the getdate in INT format, check this
  5. Ismailc New Member

    My variable @[User::RunDate] displays as 20070101 (String)
    Do you know how to convert this to: 01 Jan 2007 ?
    Line break char(13)? "line break" + char(13) ? (no idea)
  6. ranjitjain New Member

    In SQL server you could do this in the following way:
    declare @var1 int
    convert(datetime,cast(@var1 as varchar(10)),112)

Share This Page