multi-part identifier could not be bound

  • I have a 3 tables :

    1. tblCaseInfo with CaseID, ResolutionID

    2. tblSessions with CaseID, Location

    3. tlkResolution with ResolutionID

    get all resolved cases for a particular LOCATION.

    trying to do the following query, but gives an error saying multi-part identifier S.SessionsLocName could not be bound.

    however, S.SessionsLocName is in tblSessions

    SELECT COUNT(C.CaseID) AS CaseCount

    FROM tblCaseInfo C

    JOIN tblSessions S on S.CaseID = C.CaseID

    JOIN tblResolution R on C.ResolutionID = R.ResolutionID

    WHERE (S.SessionLocName = 'CMC')

    Thanks,

    Arun

  • Perhaps try a select * rather than going for the count straight away. You'll see all of your column names there. Perhaps you've misspelt the name in either the table definition or your query. If that doesn't help, please post the create table statements for your tables.

  • I'll try that.

    Thanks for the suggestions.

  • arun.samuel (3/7/2008)


    I have a 3 tables :

    1. tblCaseInfo with CaseID, ResolutionID

    2. tblSessions with CaseID, Location

    3. tlkResolution with ResolutionID

    get all resolved cases for a particular LOCATION.

    trying to do the following query, but gives an error saying multi-part identifier S.SessionsLocName could not be bound.

    however, S.SessionsLocName is in tblSessions

    SELECT COUNT(C.CaseID) AS CaseCount

    FROM tblCaseInfo C

    JOIN tblSessions S on S.CaseID = C.CaseID

    JOIN tblResolution R on C.ResolutionID = R.ResolutionID

    WHERE (S.SessionLocName = 'CMC')

    Thanks,

    Arun

    Note that in your WHERE clause you are missing an "s" You mention that SessionsLocName is in your table, but you are referencing SessionLocName

    Regards,

    Andras


    Andras Belokosztolszki, MCPD, PhD
    GoldenGate Software

  • I misspelt it while posting.

    The error does say TblSessions.SessionLocName.

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

You must be logged in to reply to this topic. Login to reply