Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 1280
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 JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Omegamon for DB2 query ashek15 DB2 0 Wed Feb 15, 2017 11:25 am
No new posts Query on DB2 WLM stored procedures ashek15 DB2 8 Sun Feb 12, 2017 11:13 pm
No new posts GETMAIN/FREEMAIN query Suja.Sai CICS 9 Tue Jan 31, 2017 12:01 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us