×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Remove repition of records

Remove repition of records

Remove repition of records

(OP)
I have a query which should return records irrespective of the field SHIP_METHOD_ID.  The query is

select
"OePo_Item"."ITEM_ID" from
"OePo_Item","OeShipMethod","ArClient","OePo_Header","ApVendor" where
("OePo_Item"."SHIP_METHOD_ID" = "OeShipMethod"."SHIP_METHOD_ID" or
"OePo_Item"."SHIP_METHOD_ID"='' and "OePo_Item"."RCVG_STATUS"='N') and
"OePo_Item"."ITEM_CLIENT_ID" = 'CHOP' and ("OePo_Item"."ITEM_ID" between 'NUR-1435' and
'NUR-1450') and "OePo_Item"."ITEM_CLIENT_ID" = "ArClient"."CLIENT_ID" and
"OePo_Item"."PO_ID" = "OePo_Header"."PO_ID" and "OePo_Item"."VENDOR_ID" =
"ApVendor"."VENDOR_ID" and "OePo_Item"."INVOICED_COUNT"='0' order by
"OePo_Item"."ITEM_ID"

It works fine except that if the SHIP_METHOD_ID field is space, it prints that record many times.  How do I get it printed only once.

Thanks

RE: Remove repition of records

I'm guessing you might have a record with a blank SHIP_METHOD_ID that's joining with other blanks, and it's returning one row for each instance of such a join.  You can do SELECT DISTINCT "OePo_Item.ITEM_ID from ...

That will get rid of all duplicates.

Linda
Pervasive Software

RE: Remove repition of records

(OP)
I am using duplicate, What it does is removes the repeating records but in some cases it ignores certain records and I am not able to find which records it is missing as the results are huge.  It affects the total amount which I am calculating.    

How do I go about it.

Thanks
 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close