Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

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.


Comment on Re: SQl logic inPerl
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://849606]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2014-09-20 12:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (159 votes), past polls