Forum Replies Created

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

  • RE: Wny "JOIN expression not supported"?

    I figured it out, I figured it out, I FIGURED IT OUT!!!!!

    select

    supertable.Date

    , supertable.[Lname, Fname]

    , supertable.Last

    , supertable.First

    , supertable.File AS FileNum

    , supertable.Title

    , supertable.PayrollTitle

    , supertable.Bank

    , supertable.[Active Staff] AS Active

    , supertable.Reason

    , xxxAbsenceReasons.ReasonDesc

    ,...

  • RE: Wny "JOIN expression not supported"?

    same syntax error...

    select

    supertable.Date

    , supertable.[Lname, Fname]

    , xxxSTAFF.Last

    , xxxSTAFF.First

    , xxxSTAFF.File AS FileNum

    , xxxSTAFF.Title

    , xxxSTAFF.PayrollTitle

    , xxxSTAFF.Bank

    , xxxSTAFF.[Active Staff] AS Active

    , supertable.Reason

    , xxxAbsenceReasons.ReasonDesc

    , xxxAbsenceReasons.DOECode

    , supertable.Substitute

    , supertable.Comment

    , supertable.OP198

    , supertable.OP201

    , supertable.EIS

    , xxxBanks.Desc AS BankTitle

    ,...

  • RE: Wny "JOIN expression not supported"?

    As suggested, I revised the code (see below) but now I'm getting the error "Syntax error in JOIN expression". I can't seem to spot the issue...:unsure:

    select

    supertable.Date

    ,...

  • RE: What's wrong with my DISTINCT

    ...I need to study this row number() thing. Will let you know how it goes when I straigten it out. Thanks for being so patient with my newbieness.

  • RE: What's wrong with my DISTINCT

    :0( Now it says I'm missing the "GROUP BY" clause... (still working on it)...

  • RE: What's wrong with my DISTINCT

    Lynn Pettis (2/5/2013)


    momba (2/5/2013)


    RE: Lowell's post....results are still too high... when I try to follow your logic in the code I get lost in the syntax around "GROUP BY" so...

  • RE: What's wrong with my DISTINCT

    RE: Lowell's post....results are still too high... when I try to follow your logic in the code I get lost in the syntax around "GROUP BY" so I started back...

  • RE: What's wrong with my DISTINCT

    I'm trying to pull out the last record for each employee, i.e. if they appear in the table two or more times, I just want the record attached to the...

  • RE: Changing from "hard-coded" to dynamic query

    Lynn Pettis (1/25/2013)


    Sean Lange (1/25/2013)


    Depending on how often you will be running this query you might consider using sp_executesql instead of the more generic exec. It will cache your execution...

  • RE: Changing from "hard-coded" to dynamic query

    Sean Lange (1/25/2013)


    momba (1/25/2013)


    Sean Lange (1/25/2013)


    Depending on how often you will be running this query you might consider using sp_executesql instead of the more generic exec. It will cache your...

  • RE: Changing from "hard-coded" to dynamic query

    Wow, before I even post my reply you've answered my question.

    (you're like a real Jedi knight)

    ...I'm going to try your method now.

  • RE: Changing from "hard-coded" to dynamic query

    Sean Lange (1/25/2013)


    Depending on how often you will be running this query you might consider using sp_executesql instead of the more generic exec. It will cache your execution plan and...

  • RE: Changing from "hard-coded" to dynamic query

    ... I came across one last issue. How can I make the " While @loopYrbeg < year ( getdate() )" statement conditional?

    More specifically IF month ( getdate() ) <...

  • RE: Changing from "hard-coded" to dynamic query

    Ohhhhh (duh). That makes sense.

    Thank you!!!! 😀

  • RE: Changing from "hard-coded" to dynamic query

    Yes, this is getting really close (thank you)... but how do I union the current table with all the archives?

    i.e.

    select * TableCurrent

    WHERE BRANCHID='950' AND (DISC_DTE IS NULL OR...

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