locked
Question about get value for an id RRS feed

  • Question

  • Hi

    I am trying to write a sql query that takes an id of a company called "Acme Rentals" and instead of displaying the id, display the name. I know how to do a join, however what table would I find this in?

    SELECT 
    	CON.FullName								AS 'Member Name',
    	CON.new_SalesChannelOnlyforPrivateMembers	AS 'Bll To Company',
    	STG.Value									AS 'Plan Type',
    	StatusCode
    
    FROM
    dbo.Contact CON
    
    LEFT OUTER JOIN StringMap STG
                 ON           STG.attributename  = 'new_coveragetype' 
                AND           STG.attributevalue = CON.new_CoverageType 
                AND           STG.objecttypecode = 2 
                AND           STG.langid = 1033
    
    WHERE 
    
    CON.new_SalesChannelOnlyforPrivateMembers = '7434249C-76D0-E211-8FD5-00155D0A1422'
    and
    CON.StatusCode = 1

    Monday, July 15, 2013 7:41 PM

All replies