Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re: SQl logic inPerl

by brap (Pilgrim)
on Jul 14, 2010 at 18:42 UTC ( #849606=note: print w/replies, xml ) Need Help??

in reply to SQl logic inPerl

How about something along the lines of:
select name from mytable where acc = '12345' and year = (select max(year) from mytable where year in( $year, $year+1 +))
The syntax is probably dependent on your database, though.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://849606]
[LanX]: Official YAPC Africa 2013 Announcement
erix always game to pull legs from sleeping cells
[erix]: hm nice might do a spot of diving - Red Sea is said to be beautiful
[LanX]: well too many terrorist tourists
[erix]: I guess I can pass for a native
[LanX]: talking about destruction of diving spots
[LanX]: Nodes to consider
[erix]: oops - got to run, see you later
[robby_dobby]: erix: 'appy day'ving

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (12)
As of 2017-04-24 16:20 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (442 votes). Check out past polls.