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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Database & SysAdmin
  3. Database
  4. SQL - Server 2008 - Doubling Problem

SQL - Server 2008 - Doubling Problem

Scheduled Pinned Locked Moved Database
databasesysadminhelptutorial
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.
  • P Offline
    P Offline
    Paramu1973
    wrote on last edited by
    #1

    I have a Query select sup_ref_no,mpr_no from qotemst where sup_ref_no ='103006' Getting O/P like..... sup_ref_no mpr_no 103006 32 103006 32 Good. No problem. Also I have a Query select mpr_no,mpr_date from mprmst where mpr_no ='32' Getting O/P like..... mpr_no mpr_date 32 2009-10-15 00:00:00:000 32 2009-10-15 00:00:00:000 Good No problem. Also I have a Query select sup_ref_no,mpr_no from qotemst where mpr_no ='32' Getting O/P like..... sup_ref_no mpr_no 1551 32 1551 32 103006 32 103006 32 Good No problem. Also I have a Query Select q.sup_ref_no,q.item_code,q.mpr_no,m.mpr_date from qotemst q,mprmst m where q.sup_ref_no='103006' and m.mpr_no=q.mpr_no or Select q.sup_ref_no,q.item_code,m.mpr_no,m.mpr_date from qotemst q,mprmst m where q.sup_ref_no='103006' and m.mpr_no=q.mpr_no Getting O/P like.....sup_ref_no item_code mpr_no mpr_date 103006 SQUAWAS1 32 2009-10-15 00:00:00.000 103006 SQUAWAS2 32 2009-10-15 00:00:00.000 103006 SQUAWAS1 32 2009-10-15 00:00:00.000 103006 SQUAWAS2 32 2009-10-15 00:00:00.000 Doubling Problem, So how to solve it... Any Ideas...Thanks :thumbsup:

    N 1 Reply Last reply
    0
    • P Paramu1973

      I have a Query select sup_ref_no,mpr_no from qotemst where sup_ref_no ='103006' Getting O/P like..... sup_ref_no mpr_no 103006 32 103006 32 Good. No problem. Also I have a Query select mpr_no,mpr_date from mprmst where mpr_no ='32' Getting O/P like..... mpr_no mpr_date 32 2009-10-15 00:00:00:000 32 2009-10-15 00:00:00:000 Good No problem. Also I have a Query select sup_ref_no,mpr_no from qotemst where mpr_no ='32' Getting O/P like..... sup_ref_no mpr_no 1551 32 1551 32 103006 32 103006 32 Good No problem. Also I have a Query Select q.sup_ref_no,q.item_code,q.mpr_no,m.mpr_date from qotemst q,mprmst m where q.sup_ref_no='103006' and m.mpr_no=q.mpr_no or Select q.sup_ref_no,q.item_code,m.mpr_no,m.mpr_date from qotemst q,mprmst m where q.sup_ref_no='103006' and m.mpr_no=q.mpr_no Getting O/P like.....sup_ref_no item_code mpr_no mpr_date 103006 SQUAWAS1 32 2009-10-15 00:00:00.000 103006 SQUAWAS2 32 2009-10-15 00:00:00.000 103006 SQUAWAS1 32 2009-10-15 00:00:00.000 103006 SQUAWAS2 32 2009-10-15 00:00:00.000 Doubling Problem, So how to solve it... Any Ideas...Thanks :thumbsup:

      N Offline
      N Offline
      Niladri_Biswas
      wrote on last edited by
      #2

      Try the queries like this a) select distinct(sup_ref_no),mpr_no from qotemst where sup_ref_no ='103006' b) select distinct(mpr_no),mpr_date from mprmst where mpr_no ='32' c) select distinct(sup_ref_no),mpr_no from qotemst where mpr_no ='32' then try the last Hope it works :)

      Niladri Biswas

      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