Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8609689
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T03:56:27+00:00 2026-06-12T03:56:27+00:00

I’m updating queries that were using the old construction for outer joins (=* and

  • 0

I’m updating queries that were using the old construction for outer joins (=* and *=). I have 3 tables that I need to include in an outer join.

The original query is:

SELECT  s.SkillID ,
        NULL AS Signature ,
        NULL AS DPL ,
        CASE WHEN ISNULL(ds.DPL, dg.DPL) IS NULL
             THEN p.ScaleTo - p.ScaleFrom + 1
             ELSE ISNULL(ds.DPL, dg.DPL)
        END AS DefaultDPL
FROM    tbJobs j ,
        tbSkills s 
        INNER JOIN tbSkillGroups sg ON s.SkillGroupID = sg.SkillGroupID ,
        tbPerfScales p ,
        tbDPLs ds ,
        tbDPLs dg
WHERE   j.JobID = 866
        AND ( ds.LevelID=*j.LevelID
              AND ds.IDType = 1
              AND ds.GroupOrSkillID=*s.SkillID
            )
        AND ( dg.LevelID=*j.LevelID
              AND dg.IDType = 0
              AND dg.GroupOrSkillID=*sg.SkillGroupID
            )
        AND ( ( s.PerfScaleID IS NOT NULL
                AND p.PerfScaleID = s.PerfScaleID
              )
              OR ( s.PerfScaleID IS NULL
                   AND p.PerfScaleID = sg.PerfScaleID
                 )
            )

I’m doing:

SELECT  s.SkillID ,
        NULL AS Signature ,
        NULL AS DPL ,
        CASE WHEN ISNULL(ds.DPL, dg.DPL) IS NULL
             THEN p.ScaleTo - p.ScaleFrom + 1
             ELSE ISNULL(ds.DPL, dg.DPL)
        END AS DefaultDPL
FROM    tbPerfScales p ,
        tbSkills s
        INNER JOIN tbSkillGroups sg ON s.SkillGroupID = sg.SkillGroupID ,
        tbJobs j
        LEFT OUTER JOIN tbDPLs ds ON j.LevelID = ds.LevelID
                                     AND s.SkillID = ds.GroupOrSkillID
        LEFT OUTER JOIN tbDPLs dg ON j.LevelID = dg.LevelID
                                     AND sg.SkillGroupID = dg.GroupOrSkillID
WHERE   j.JobID = 866
        AND ds.IDType = 1
        AND dg.IDType = 0
        AND ( ( s.PerfScaleID IS NOT NULL
                AND p.PerfScaleID = s.PerfScaleID
              )
              OR ( s.PerfScaleID IS NULL
                   AND p.PerfScaleID = sg.PerfScaleID
                 )
            )

For some reason I’m getting the error:

The multi-part identifier “s.SkillID” could not be bound.

And I know is in this part:

    tbJobs j
    LEFT OUTER JOIN tbDPLs ds ON j.LevelID = ds.LevelID
                                 AND s.SkillID = ds.GroupOrSkillID

I’m not sure what I’m doing wrong.

Thanks any help.
Jose

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T03:56:28+00:00Added an answer on June 12, 2026 at 3:56 am

    There is a comma after the statement

    INNER JOIN tbSkillGroups sg ON s.SkillGroupID = sg.SkillGroupID ,
    

    Which is because you have tbJobs after it, when it should be in the other tables. I would recommend using CROSS JOIN instead of just having multiple tables in the FROM clause as it will be more clear.

    Here is the base rewrite of your query that should work, though you should be able to easily get rid of most of the cross joins.

    SELECT  s.SkillID ,
            NULL AS Signature ,
            NULL AS DPL ,
            CASE WHEN ISNULL(ds.DPL, dg.DPL) IS NULL
                 THEN p.ScaleTo - p.ScaleFrom + 1
                 ELSE ISNULL(ds.DPL, dg.DPL)
            END AS DefaultDPL
    FROM    tbPerfScales p 
            CROSS JOIN tbSkills s
            CROSS JOIN tbJobs j
            INNER JOIN tbSkillGroups sg ON s.SkillGroupID = sg.SkillGroupID
            LEFT OUTER JOIN tbDPLs ds ON j.LevelID = ds.LevelID
                                         AND s.SkillID = ds.GroupOrSkillID
            LEFT OUTER JOIN tbDPLs dg ON j.LevelID = dg.LevelID
                                         AND sg.SkillGroupID = dg.GroupOrSkillID
    WHERE   j.JobID = 866
            AND ds.IDType = 1
            AND dg.IDType = 0
            AND ( ( s.PerfScaleID IS NOT NULL
                    AND p.PerfScaleID = s.PerfScaleID
                  )
                  OR ( s.PerfScaleID IS NULL
                       AND p.PerfScaleID = sg.PerfScaleID
                     )
                )
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have thousands of HTML files to process using Groovy/Java and I need to
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I need a function that will clean a strings' special characters. I do NOT
I have a small JavaScript validation script that validates inputs based on Regex. I
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.