Forum Replies Created

Viewing 10 posts - 1 through 10 (of 10 total)

  • RE: Auto Email based on rule - Is it possible?

    Hello 🙂

    Thanks for your reply I didn't think anyone was coming back to me on this.

    Yes emails on weekends are fine the managers can just pick them up...

  • RE: Auto Email based on rule - Is it possible?

    John Mitchell-245523 (7/21/2016)


    Or you could go with 13, 26 and 39 weeks, to make it more likely that the manger will be informed on a working day. Start with...

  • RE: Auto Email based on rule - Is it possible?

    Jeff Moden (7/20/2016)


    If someone is hired on Nov 30th, 2011, what is considered to be 3, 6, and 9 months from then according to your rules?

    Hi Jeff,

    Many thanks for...

  • RE: IF, THEN in T-SQL?

    John Mitchell-245523 (4/21/2016)


    Something like this...

    WITH Departments AS (

    SELECT *, d.DepartmentName,

    CASE WHEN p.PDT_ORG_4_CDA LIKE 'X%'

    THEN p.PDT_ORG_5_CDA

    ELSE p.PDT_ORG_4_CDA

    END AS DeptCode

    )

    From stage_chris21.PSDET p

    INNER JOIN Departments d

    ON p.[DeptCode] = d.DepartmentCode

    ... or this:

    SELECT *,...

  • RE: IF, THEN in T-SQL?

    John Mitchell-245523 (4/21/2016)


    You can't join on a column alias. Either wrap the whole SELECT statement in a CTE or subquery, or repeat the whole CASE expression in your join...

  • RE: IF, THEN in T-SQL?

    GilaMonster (4/21/2016)


    IIF was added in SQL 2014, but in earlier versions you'd use CASE (IF is control flow)

    CASE WHEN [PDT_ORG_4_CDA LIKE 'X%'

    ...

  • RE: Assign Primary Key to existing field in a View/Query?

    John Mitchell-245523 (4/12/2016)


    wrightyrx7 (4/12/2016)


    Is it possible to make the DepartmentCode the Primary Key?

    No, a primary key is a property of the table, not of a particular query that you execute...

  • RE: Access SQL to SQL

    Luis Cazares (1/14/2016)


    I'm not sure what's the problem. The code should be working and there's no missing parenthesis. That's just another reason why I hate Oracle.

    Maybe someone else can help.

    By...

  • RE: Access SQL to SQL

    Luis Cazares (1/14/2016)


    wrightyrx7 (1/14/2016)


    Luis Cazares (1/14/2016)


    Oracle does not use TOP(n). One alternative is to filter by ROW_NUMBER().

    SELECT T1.*,

    (SELECT END_DATE

    FROM...

  • RE: Access SQL to SQL

    Luis Cazares (1/14/2016)


    Oracle does not use TOP(n). One alternative is to filter by ROW_NUMBER().

    SELECT T1.*,

    (SELECT END_DATE

    FROM (SELECT T3.SMN_DATEC-1 AS...

Viewing 10 posts - 1 through 10 (of 10 total)