Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
SQL Query needed.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: SQL Query needed.
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    Post subject:
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    Post subject:
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    Post subject: Reply to: SQL Query needed.
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

Site Director


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

PostPosted: Wed Oct 06, 2010 7:36 pm    Post subject: Reply to: SQL Query needed.
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts query to fetch record which has only ... maxsubrat DB2 11 Mon Dec 11, 2017 5:03 pm
No new posts How to query MAXGENS of an existing P... Chuchulo Hatyzak JCL & VSAM 4 Wed Nov 22, 2017 10:23 pm
No new posts Native SQL Query kishpra DB2 1 Wed Nov 22, 2017 8:38 pm
No new posts Query on IEFBR14 with GDG Ashishpanpaliya JCL & VSAM 4 Tue Nov 07, 2017 8:34 pm
No new posts Query on XMITIP abdulrafi All Other Mainframe Topics 1 Wed Oct 25, 2017 6:54 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us