Multi part identifier could not be bound error

  • Hi

    when i try to run this query getting error malti part identifier Rpt.fullname couldnot be bound

    select distinct

    Rpt.fullname as Member Name

    ,Rpt.memid as Member ID

    ,e.orgeffdate as Org Effec

    ,e.effdate as Effective from RptAgeGrpVw rpt

    inner join enrollkeys e on rpt.memid = e.memid

    order by Member Name

    Thanks

  • try it like this:

    select distinct

    Rpt.fullname as [Member Name]

    ,Rpt.memid as [Member ID]

    ,e.orgeffdate as [Org Effec]

    ,e.effdate as Effective from RptAgeGrpVw rpt

    inner join enrollkeys e on rpt.memid = e.memid

    order by [Member Name]

    The probability of survival is inversely proportional to the angle of arrival.

  • Try this it should work

    SELECT DISTINCT

    Rpt.fullname as [Member Name]

    ,Rpt.memid as [Member ID]

    ,e.orgeffdate as [Org Effec]

    ,e.effdate as [Effective]

    FROM

    RptAgeGrpVw AS rpt

    INNER JOIN

    enrollkeys AS e

    on

    rpt.memid = e.memid

    ORDER BY

    [Member Name]

    Scott

    Scott
    I am a Senior Data Analyst/DBA
    I work with MS SQL, Oracle & several ETL Tools

    @thewolf66[/url]

  • Thanks

    it worked.

    but y it didnt work without []?

    Thanks

  • .

    but y it didnt work without []?

    MSSQL query engine can not parse it correctly and column name can not have spaces in them. Rpt.fullname as Member Name this look like you are ref to more then col by use [] around [Member Name] it make correct

    Scott

    Scott
    I am a Senior Data Analyst/DBA
    I work with MS SQL, Oracle & several ETL Tools

    @thewolf66[/url]

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

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