Forum Replies Created

Viewing 15 posts - 16 through 30 (of 85 total)

  • RE: sys.sql_modules truncating definition

    Actually i am try to log the changes using a trigger

    SET ANSI_NULLS ON

    GO

    SET QUOTED_IDENTIFIER ON

    GO

    SET ANSI_PADDING ON

    GO

    CREATE TABLE [dbo].[tblStoredProcedureAudit](

    [ObjectName] [varchar](256) NULL,

    [TSQLCommand] [nvarchar](max) NULL,

    [Date_Time] [datetime] NULL,

    [Modified_User] [varchar](256) NULL

    ) ON [PRIMARY]

    GO

    SET ANSI_PADDING...

  • RE: Query help to find total

    declare @rollup table(

    id int,

    cnt int)

    insert into @rollup values(339,15),(340,5),(341,2)

    select isnull(cast(id as varchar(12)),'Total'),SUM(cnt) from @rollup

    group by rollup(id)

  • RE: synonyms not showing in Excel

    We can see the synonyms everwhere except in excel even after selecting show synonyms.

    Where did you select this option to show synonyms?

  • RE: Split yearQuarter

    Add 2 derived columns and use the expressions

    RIGHT([yearquarter],2 )

    LEFT([yearquarter],4 )

    Just realized there is not left function is SSIS

    better use the substring

    SUBSTRING("2014Q3",5,2)

    SUBSTRING("2014Q3",1,4)

  • RE: How to look for folder starting with some alphabet alone

    As suggested in the post http://microsoft-ssis.blogspot.com/2011/01/foreach-folder-enumerator.html

    you can use the script task.

    A few tweaks like adding a for loop container with in a for loop container should be done...

  • RE: Create Periods Transaction Dates and make them columns

    If i understood the requirment correctly you can use case statement

    select

    gl_account.id as GLAcct,

    gl_account.descr as GLDesc,

    case when gl_ledger.transaction_date between '2014-01-01 00:00:00.000' and '2014-01-31 23:59:59.000' then sum(gl_ledger.amount_n) end as P1,

    case...

  • RE: Simple looping problem

    declare @sample table(id varchar(1),

    dt datetime,

    line_counter int)

    insert into @sample values('A','01/01/2013',null),('A','01/01/2014',null),('B','01/01/2013',null)

    ,('A','01/01/2012',null)

    select ID,dt,(select COUNT(*) + 1 from @sample t2 where

    t1.id = t2.id

    and t1.dt > t2.dt) as line_counter

    from @sample t1

    order by line_counter

  • RE: Simple looping problem

    Today to many row_number questions

    declare @sample table(id varchar(1),

    dt datetime,

    line_counter int)

    insert into @sample values('A','01/01/2013',null),('A','01/01/2014',null),('B','01/01/2013',null)

    select id,dt,row_number() over (partition by id order by dt asc) as line_counter from @sample

  • RE: SSIS capturing multiple variables

    Please use the below code for btnCampaignCode_Click

    void btnCampaignCode_Click(object sender, EventArgs e)

    {

    ...

  • RE: SSIS capturing multiple variables

    i guess you are missing the attachment.

  • RE: Adding a number to a string to create series

    declare @eventid table(Eventid int)

    insert into @eventid values(31206),(31206),(31206),(31206),(31206),(31207),(31207)

    select CAST(eventid as varchar(12)) + CAST(ROW_NUMBER() over(partition by eventid order by eventid) as varchar(12)) from @eventid

    as d_eventid

  • RE: SSIS capturing multiple variables

    chage the line

    lblCampaign_Code.Text = "CampaignCode" + i + 1;

    to

    lblCampaign_Code.Text = "CampaignCode" + (i + 1);

    Campaign_Code.TextAlign = ContentAlignment.MiddleCenter is already commented in my orgianl code. so you can keep that...

  • RE: SSIS capturing multiple variables

    Go to the project explorer window(CTRL+ALT+L). then right click on the references and add the system.drawing reference as show in the previous screen shot.

  • RE: Programmatically generate a number sequence

    select 'Task-ID.' + cast(ROW_NUMBER() over(order by something) as varchar(12)) from SomeOtherTable

    where something = 'someothervalue'

  • RE: SSIS capturing multiple variables

    you have to add the system.drawing reference. Attached is the screen shot.

Viewing 15 posts - 16 through 30 (of 85 total)