Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. query error

query error

Scheduled Pinned Locked Moved Database
databasehelpquestion
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Bhairava Prasad
    wrote on last edited by
    #1

    select Category_name,Subcategory_name,Title from Foodbazaar_tbl where Foodbazaar_tbl.Category_name Like'food%' UNION ALL select Category_name,Subcategory_name,Title from Weightmanagement_tbl where Weightmanagement_tbl.Category_name Like'food%' buy using this query am getting the output of combination data from all tables. now i require the count of Category_name what is the query for getting the count of category_name to above output plz replay........

    bhairava prasad

    A M A 3 Replies Last reply
    0
    • B Bhairava Prasad

      select Category_name,Subcategory_name,Title from Foodbazaar_tbl where Foodbazaar_tbl.Category_name Like'food%' UNION ALL select Category_name,Subcategory_name,Title from Weightmanagement_tbl where Weightmanagement_tbl.Category_name Like'food%' buy using this query am getting the output of combination data from all tables. now i require the count of Category_name what is the query for getting the count of category_name to above output plz replay........

      bhairava prasad

      A Offline
      A Offline
      Anurag Sinha V
      wrote on last edited by
      #2

      select COUNT(Category_name) from TableName where Category_name like '%SearchPrefix%'

      1 Reply Last reply
      0
      • B Bhairava Prasad

        select Category_name,Subcategory_name,Title from Foodbazaar_tbl where Foodbazaar_tbl.Category_name Like'food%' UNION ALL select Category_name,Subcategory_name,Title from Weightmanagement_tbl where Weightmanagement_tbl.Category_name Like'food%' buy using this query am getting the output of combination data from all tables. now i require the count of Category_name what is the query for getting the count of category_name to above output plz replay........

        bhairava prasad

        M Offline
        M Offline
        Mycroft Holmes
        wrote on last edited by
        #3

        Select count(*) Records. Category
        From (PutYourOriginalQueryHere)
        group by Category

        Never underestimate the power of human stupidity RAH

        1 Reply Last reply
        0
        • B Bhairava Prasad

          select Category_name,Subcategory_name,Title from Foodbazaar_tbl where Foodbazaar_tbl.Category_name Like'food%' UNION ALL select Category_name,Subcategory_name,Title from Weightmanagement_tbl where Weightmanagement_tbl.Category_name Like'food%' buy using this query am getting the output of combination data from all tables. now i require the count of Category_name what is the query for getting the count of category_name to above output plz replay........

          bhairava prasad

          A Offline
          A Offline
          Azarudhin
          wrote on last edited by
          #4

          hi, select COUNT(Category_name) from TableName where Category_name like '%food%' group by Category

          S Azarudhin

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups