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. Comparing rows to columns

Comparing rows to columns

Scheduled Pinned Locked Moved Database
database
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.
  • R Offline
    R Offline
    rajanandal
    wrote on last edited by
    #1

    Hi, I have one table as, id Items 1 col1 2 col2 3 col3 another table as Sid col1 col2 col3 col4 1 A B NULL NULL 2 D E NULL F now i have to compare Items of tbl1 with columns of tbl2. here i need the output as true or false from select query. for ex. col1 of tbl1 is compared with col1 of tbl2.if the col1 has value then it should return false. if all values are null then it should return as true. here im expecting col1-false,col2-false,col3-true

    Nothing is Impossible. Keep always Smiling... :)

    modified on Wednesday, May 5, 2010 5:39 AM

    J 1 Reply Last reply
    0
    • R rajanandal

      Hi, I have one table as, id Items 1 col1 2 col2 3 col3 another table as Sid col1 col2 col3 col4 1 A B NULL NULL 2 D E NULL F now i have to compare Items of tbl1 with columns of tbl2. here i need the output as true or false from select query. for ex. col1 of tbl1 is compared with col1 of tbl2.if the col1 has value then it should return false. if all values are null then it should return as true. here im expecting col1-false,col2-false,col3-true

      Nothing is Impossible. Keep always Smiling... :)

      modified on Wednesday, May 5, 2010 5:39 AM

      J Offline
      J Offline
      Johan Hakkesteegt
      wrote on last edited by
      #2

      What have you tried so far ?

      My advice is free, and you may get what you paid for.

      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