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. considering all the columns in a field

considering all the columns in a field

Scheduled Pinned Locked Moved Database
databasehelpannouncement
2 Posts 2 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.
  • J Offline
    J Offline
    jishbalan
    wrote on last edited by
    #1

    Hello friends, I having two table, one table havin only one fields. eg : Table A release rel1 rel2 rel3 I want to select datas from other table. table B release case ID rel1 a 1 rel1 b 1 rel2 a 2 rel3 c 3 I want to select the cases and ID from table B where release is all the datas present in TAble A. I can build the query to get case and ID. Actually i need the query for another purpose. I used below query SELECT cases, ID FROM TAble B WHERE release IN(Select release from TAble B) this query is very slow for my purpose The query should link both the table Please help me to opimise the query Regards Jishith

    A 1 Reply Last reply
    0
    • J jishbalan

      Hello friends, I having two table, one table havin only one fields. eg : Table A release rel1 rel2 rel3 I want to select datas from other table. table B release case ID rel1 a 1 rel1 b 1 rel2 a 2 rel3 c 3 I want to select the cases and ID from table B where release is all the datas present in TAble A. I can build the query to get case and ID. Actually i need the query for another purpose. I used below query SELECT cases, ID FROM TAble B WHERE release IN(Select release from TAble B) this query is very slow for my purpose The query should link both the table Please help me to opimise the query Regards Jishith

      A Offline
      A Offline
      Ashfield
      wrote on last edited by
      #2

      Try this

      SELECT cases, ID
      FROM TAbleB b
      Join TableA a on a.release = b.release

      and check your indices

      Bob Ashfield Consultants Ltd Proud to be a 2009 Code Project MVP

      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