Home » SQL & PL/SQL » SQL & PL/SQL » Sql Query
Sql Query [message #390902] Tue, 10 March 2009 04:17 Go to next message
u263066
Messages: 47
Registered: March 2007
Member
Is there any way to pull the details as given

here is data what i am getting
suppllierno 	invnum     amt
100		10001       50
100             10002	    50
101             10003       67
101             10004	    87
102             10100	    57
100             10007       67
102             10004	    87
101             10109	    57
108		10101	    89


I need to bring this based out of unqiue value in column supplierno.


DNumber suppllierno 	invnum     amt
01	100		10001       50
01	100             10002	    50
02	100             10007       67
02	101             10003       67
02	101             10004	    87
02	101             10109	    57
03	102             10100	    57
03	102             10004	    87
04	108		10101	    89

Re: Sql Query [message #390907 is a reply to message #390902] Tue, 10 March 2009 04:41 Go to previous messageGo to next message
pablolee
Messages: 2834
Registered: May 2007
Location: Scotland
Senior Member
Hi u263066
Your posts seem to follow a pattern
1. You rarely give feedback (unless you want more info).
2. Your Subject titles are useless and meaningless.
3. You simply post examples of data, instead of posting a test case.
4. You do not fully explain what you actually need, rather, you post a sample of data, then another, pretty much random, sample of data.

Continuing in this vein will simply prevent you from getting the best use out of this forum.
Please go and read the forum guide, follow it and post back, afhering to the guidelines/ rules.
Cheers
Jim
Re: Sql Query [message #390930 is a reply to message #390907] Tue, 10 March 2009 06:23 Go to previous message
ramoradba
Messages: 2454
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
Hi....u263066

first of all if your desired answer is just like below
please check your desired answer.
DNumber suppllierno 	invnum     amt
01	100		10001       50
01	100             10002	    50
01	100             10007       67
02	101             10003       67
02	101             10004	    87
02	101             10109	    57
03	102             10100	    57
03	102             10004	    87
04	108		10101	    89

now compare this with your post.if this is not your required one,then
as @pablolee
post your DDL or DML for that records inserted into that table rather than posting your dreamyyy output. if the above is your desired one you can do that. just write one procedure.if not post as per the above mentioned so that the forum will help you.
Previous Topic: Sql Filter
Next Topic: to find sysdate of remote database (merged 3)
Goto Forum:
  


Current Time: Fri Dec 02 23:14:27 CST 2016

Total time taken to generate the page: 0.04924 seconds