Results 1 to 2 of 2

Thread: Query Help!

  1. #1
    Join Date
    Oct 2002
    Posts
    9

    Post Unanswered: Query Help!

    I am having trouble getting my query right.

    This is what I have:


    Table – Parameter_Definition

    Columns--ParamName
    -------------------------------------
    -----------Param1
    -----------Param2
    -----------Param3
    -----------Param4
    -----------Param5
    -----------Param6
    -----------Param7
    -----------Param8
    -----------Param9
    -----------Param10
    -------------------------------------


    Table – Code_Version_Detail

    Columns--Element-------ElementType--------ElementValue
    -------------------------------------------------------------------------
    ----------Param1--------Parameter----------123
    ----------Param5--------Parameter----------234
    ----------File33----------File-----------------\File\Location\1
    ----------Param6--------Parameter----------34553
    ----------Param9--------Parameter----------4567
    ----------File34----------File-----------------\File\Location\2
    -------------------------------------------------------------------------


    This is what I want in the result:

    Columns--Parameter--------ParameterValue
    -------------------------------------------------------------------------
    ----------Param1----------123
    ----------Param2
    ----------Param3
    ----------Param4
    ----------Param5----------234
    ----------Param6----------34553
    ----------Param7
    ----------Param8
    ----------Param9----------4567
    ----------Param10
    -------------------------------------------------------------------------



    This looks like it is doable but I can’t get it quite right. Thank you very much in advance for taking a look at it.

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Code:
    select ParamName      as Parameter
         , ElementValue   as ParameterValue
      from Parameter_Definition
    left outer
      join Code_Version_Detail
        on ParamName = Element
       and             ElementType = 'Parameter'
    order by ParamName
    rudy
    http://r937.com/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •