How to execute a simple query... need help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Sl1ver
    New Member
    • Mar 2009
    • 196

    How to execute a simple query... need help

    say i have 3 different cities in 1 table how do i join them so that the result doesn't bring back 3 columns with 9 rows?
  • yarbrough40
    Contributor
    • Jun 2009
    • 320

    #2
    can you type out an example of your data table and the SQL you have attempted to use?

    Comment

    • Sl1ver
      New Member
      • Mar 2009
      • 196

      #3
      here is my example, its complicated thats why im asking a more simplified question of what im try'ing to achieve

      Comment

      • yarbrough40
        Contributor
        • Jun 2009
        • 320

        #4
        Originally posted by Sl1ver
        here is my example, its complicated thats why im asking a more simplified question of what im try'ing to achieve

        http://bytes.com/topic/sql-server/an...-only-have-2-a
        sorry bro - I got pulled away on business and coud not respond... did you ever find a solution for this? your example you showed is still a bit confusing.

        Comment

        • Jim Doherty
          Recognized Expert Contributor
          • Aug 2007
          • 897

          #5
          Originally posted by Sl1ver
          here is my example, its complicated thats why im asking a more simplified question of what im try'ing to achieve

          http://bytes.com/topic/sql-server/an...-only-have-2-a
          in your previous post ck9663 responded but you did not answer his suggestion one way or the other.

          You have two resolution potentials either the ck9663 offering or a different concept entirely and that is using queries involving the term UNION

          In simple terms this is where one recordset gets piled on top of the other with the option to show duplicates or not. (UNION or UNION ALL) This is distinctly different from querying using the left join in your circumstances.

          This feature is fully documented on SQL Servers help files (books online)

          Comment

          Working...