Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2007
    Location
    Auckland New Zealand
    Posts
    120
    Provided Answers: 1

    Unanswered: Search Categories

    I have two tables can I print the Description from Both of them as a single Column from a select statement

    Something Like
    Select Trade_Category.iCategory_Name as Names,
    FreeCategory.sName as Names From Trade_Category,FreeCategory Where
    FreeCategory.iParent = 0 OR Trade_Category.iParent_Category = 0

    But instead of two columns

    Names Names
    A B
    A B
    A B
    A


    Just the One
    Names
    A
    A
    A
    A
    B
    B
    B

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Code:
    SELECT iCategory_Name as Names
      FROM Trade_Category
     WHERE iParent_Category = 0
    UNION ALL
    SELECT sName 
      FROM FreeCategory 
     WHERE iParent = 0
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Aug 2007
    Location
    Auckland New Zealand
    Posts
    120
    Provided Answers: 1
    Awesome Thanks alot

Posting Permissions

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