IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

SQL Query needed.


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vijayakumar.yellala

New User


Joined: 19 Apr 2006
Posts: 63
Location: Chennai

PostPosted: Wed Oct 06, 2010 11:13 am
Reply with quote

Hi,

I need a query from below table.

V.NO. SEQ.NO. OWNER S.TYPE S.DATE
V1 1 OW1 S 10/10/2010
V1 2 OW2 R 08/10/2010
V1 3 OW3 1 06/10/2010
V1 4 OW4 R 01/10/2010

Fron above table results would be
Owner name S.date
OW2 08/10/2010

P.Key (V.NO & SEQ.NO)


Plz help me out on this.

Regards
Vijay
Back to top
View user's profile Send private message
kacks7

New User


Joined: 22 Sep 2010
Posts: 33
Location: chennai(india)

PostPosted: Wed Oct 06, 2010 11:55 am
Reply with quote

hi,

why don't you use select required lcolumns from the table where the v.vno=v2 and seq.no=2.
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Wed Oct 06, 2010 12:59 pm
Reply with quote

you don't need an sql query, you need sql lessons.
This is the first sql statement you'll ever learn in any class.
Back to top
View user's profile Send private message
acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Wed Oct 06, 2010 3:39 pm
Reply with quote

67 posts...mmmmm I guess you should have learnt how to use the Code tag.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Oct 06, 2010 7:36 pm
Reply with quote

Hello,

Quote:
Plz help me out on this.
Maybe if you publish the "rules" for your query . . . Why was only that one row selected/needed?

Why should people who want to help have to determine what rule(s) you want applied?

After more than 4 years here, you should know this as well as how to use the Code tag. . .

Rather disappointing icon_sad.gif

d
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts RC query -Time column CA Products 3
No new posts Dynamically pass table name to a sele... DB2 2
No new posts Query on edit primary command CLIST & REXX 5
No new posts Query on edit primary command CLIST & REXX 1
No new posts Mainframe Programmer with CICS Skill... Mainframe Jobs 0
Search our Forums:

Back to Top