MySQL Forums
Forum List  »  Newbie

MySQL query equivalent...
Posted by: Tripp Lowe
Date: June 18, 2005 08:37PM

Hey Folks,

I'm working with a MySQL database I converted from Oracle.
I already have many Oracle queries documented. Can somebody
help me convert one of them to a MySQL query?

This is one of the Oracle queries:

select '0' page_val, (c.statecd*1000+c.countycd) row_val, decode(nvl(c.stdszcd,-1),
1,'`ld`',
2,'`md`',
3,'`sd`',
4,'`ch`',
5,'`ns`',
-1,'`nc`',
'`0007 Other`') col_val, sum(nvl(c.condprop_curr* 1,0)) attribute from nm.SNAPSHOT_cond c, nm.SNAPSHOT_plot p,nm.SNAPSHOT_plot_geom pg
where
p.ry_cn=c.ry_plt_cn and
p.ry_cn=pg.ry_cn and
c.condprop_curr<>0 and
( (p.statecd=01 and p.reportyr=2003 and p.countycd in (001))) and
c.cond_status_cd in (1,2,3)
group by '0',(c.statecd*1000+c.countycd),decode(nvl(c.stdszcd,-1),
1,'`ld`',
2,'`md`',
3,'`sd`',
4,'`ch`',
5,'`ns`',
-1,'`nc`','`0007 Other`')



Thanks.
T. Lo
WSFR, UGA

Options: ReplyQuote


Subject
Written By
Posted
MySQL query equivalent...
June 18, 2005 08:37PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.