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: 1278
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 Join in SQL Query vickey_dw DB2 2 Tue Jan 17, 2017 12:15 am
This topic is locked: you cannot edit posts or make replies. MQ setup query mohitsaini Java & MQSeries 4 Sun Jan 08, 2017 1:53 am
No new posts DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm


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