SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Convert SQL Server Query to Oracle query
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

zwheeler
Starting Member

USA
19 Posts

Posted - 06/27/2012 :  10:43:54  Show Profile  Reply with Quote
Hi our oracle developer is out for the rest of the week and i need to convert a sql server query to an oracle query. Any help would be greatly appreciated.

<code>

update stg_property
set tag_fama_score = pa.tag_fama_score,
cat_fama_score_color = pa.cat_fama_score_color
from stg_property p
inner join oe_mf_data_mart..mf_loan_perf_quartly_panel Pa
on p.pk_property_id = pa.fk_property_id
and
--Bring back Maximum Year
Pa.fk_fiscal_year = (select max(qp0.fk_fiscal_year) FROM oe_mf_data_mart..mf_loan_perf_quartly_panel qp0 WHERE qp0.fk_fha_number = pa.fk_fha_number )
--Bring back Maximum Quarter
AND Pa.fk_fiscal_quarter = (select max(qp1.fk_fiscal_quarter) FROM oe_mf_data_mart..mf_loan_perf_quartly_panel qp1 WHERE qp1.fk_fha_number = pa.fk_fha_number )


</code>

LoztInSpace
Aged Yak Warrior

876 Posts

Posted - 06/28/2012 :  00:57:33  Show Profile  Reply with Quote
They're not that different. I suspect the trouble you'll have is here:
oe_mf_data_mart..mf_loan_perf_quartly_panel
which is looking at a different database. There is no direct comparison here, you will have to check your own implementation for this part. If it were me I'd be using a linked table. Take a look at the dependencies on that table and see if you can find a previously convered example. Nobody outside your organisation will be able to help you with that I'm afraid.
The rest of it should just work.
Go to Top of Page

prett
Posting Yak Master

USA
161 Posts

Posted - 06/28/2012 :  02:35:04  Show Profile  Reply with Quote
You can use the 'Translation Scratch Editor' in SQL*Developer to translate SQL Server statements to Oracle.
SQL*Developer is free of cost & you can download it from here:

http://www.oracle.com/technetwork/developer-tools/sql-developer/overview/index.html

After installation start it up after that:
'Tools'>>'Migration'>>'Translation Scratch Editor'
Go to Top of Page

zwheeler
Starting Member

USA
19 Posts

Posted - 06/28/2012 :  16:55:11  Show Profile  Reply with Quote
thank you

i just used the translation scratch editor.
will test results tomorrow.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000