User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Oracle section within the Web Development category of DaniWeb, a massive community of 456,521 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,795 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Oracle advertiser: Programming Forums
Views: 924 | Replies: 2
Reply
Join Date: Oct 2007
Posts: 11
Reputation: yogesh_vaidya12 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 1
yogesh_vaidya12 yogesh_vaidya12 is offline Offline
Newbie Poster

SingleRowcoloms

  #1  
Oct 2nd, 2007
i have the following query
SELECT C.FIELD6 ,C.FIELD2,C.TRANSACTIONNO
FROM ipfroutine_deduction a,Servicemaster B,INPATIENTBILLALLDETAILS C,
Departments D,INPATIENTBILLS E
WHERE a.ipftestcd=b.code
AND C.BILLNO=E.BILLNO
and trim(a.ipftestname)=trim(b.childname)
AND TRIM(B.childname)=TRIM(C.FIELD2)
AND TRIM(A.IPFDEPTCD)=TRIM(C.DEPTCD)
AND TRIM(C.DEPTDESCR)=TRIM(D.NAME)
AND E.FROMDATE BETWEEN TRUNC(A.IPFFROMDATE) AND NVL(TRUNC(A.IPFTODATE),E.FROMDATE)
AND C.BILLNO = 'D00024585'

It's result as
NO FIELD6 FIELD2 TRANSACTINO
1 220 CHG (HB TC DC, PLT ETC) T08581764
2 220 CHG (HB TC DC, PLT ETC) T08582937
3 220 CHG (HB TC DC, PLT ETC) T08584394
4 120 CREATININE T08581761
5 120 CREATININE T08582934
6 120 CREATININE T08584392
7 120 CREATININE T08583900
8 100 URINE ROUTINE T08581766

IN THIS RESULT I REQUIRE ONLLY 1 NO ROW AND I WANT TO SKIP ROW NO 2,3.
I DON'T KNOW THE FUNCTION THAT TWO COLOUMN HAVE THE SAME VALUE AND THIRD ONE ARE DIFFRENT.
SO ANYBODY CAN GIVE ME SOLUTION
IT'S URGENT!
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Feb 2007
Location: Bangalore,India
Posts: 1,444
Reputation: debasisdas is on a distinguished road 
Rep Power: 4
Solved Threads: 87
debasisdas's Avatar
debasisdas debasisdas is offline Offline
Nearly a Posting Virtuoso

Re: SingleRowcoloms

  #2  
Oct 2nd, 2007
Try to use UNIQUE for field6
Share your Knowledge.
Reply With Quote  
Join Date: Oct 2007
Posts: 11
Reputation: yogesh_vaidya12 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 1
yogesh_vaidya12 yogesh_vaidya12 is offline Offline
Newbie Poster

Re: SingleRowcoloms

  #3  
Oct 3rd, 2007
Originally Posted by debasisdas View Post
Try to use UNIQUE for field6

Acutally I am just selecting the query to retriew the values. first and second coloms have the same value but third one are diffrents value. So there are three rows. But I want only first row and want to skip other two rows.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Oracle Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Other Threads in the Oracle Forum

All times are GMT -4. The time now is 4:12 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC