Wednesday, 15 July 2015

Pervasive sql to Oracle -


I'm having trouble converting this comprehensive SQL query into Oracle. O errors giving errors do not help me I am giving an error on SQL_Date

Is that what I have in broad:

  (case is when joefdt = 0 then zero when joefdt> 0 then convert (left (cONVERT (joefdt, SQL_CHAR), 4) + '-' + right (left (change (joefdt, SQL_CHAR), 6), 2 +) '-' + rIGHT (cONVERT (joefdt, SQL_CHAR), 2 ), SQL_DATE) end as EFFECTIVEDATE, (case when jopost = 0 then zero when j opost & gt; 0 then convert (left (CONVERT (jopost, SQL_CHAR), 4) + '-' + right (left (CONVERT (jopost, SQL_CHAR), 6), 2 +) '-' + right (CONVERT (jopost , SQL_CHAR), 2), SQL_DATE) intestine) as the postdate, money.code type where cdtabl = 3 and cdnumb = joetyp), (select ltrim (by rtrim (select ltrim (rtrim (Cdname)) (cdname)) Where money.code cdtabl = 5 and cdnumb = jodelm) Where money.jour as as as DELIVERYMETHOD, as well as SHARESISSUED joissd, jocand SHARESCANCELLED, joprsn BROKERID, joprsn TRANSACID Joiss = 1 and in joetyp (2,3, 4) and (Joyce & gt; 0 or Junk & gt; 0) and Zoptatty & gt; = '19920127' and Zofadat & lt; = '20040726' order by JF;  

This is what I tried to do, but it does not work:

  select (case when joefdt = 0 then tap when joefdt gt 0 cONVERT (substr (change (joefdt, SQL_CHAR), 4 +) '-' + right (left (cONVERT (joefdt, SQL_CHAR), 6), 2 +) '-' + rIGHT (cONVERT (joefdt, SQL_CHAR), 2), SQL_DATE) END) as in effect, Jbpop = 0 (in case the tap when Jopost & gt; 0 then convert (Sbstrakt (convert (Jopost, Skyuel_ Siacaar), 4) + "-" + right (left ( Convert (Jopost, SQL_CHAR), 6), 2) + '-' + Wright (Convert (Jopost, Skyuel_aaacaar), 2), Skyuelyuetiti) AD) posts as-date, error ---- SQL_DATE (select Leftim (Artiaim (Seedianm)) where money.code Seeditibl = 3 and Seedianyuem = Joitip), as money From SETRAm (RTIrim (cdnm) CRDAD = CDTBL = 5 and CDNUm = JDLM) AS DelawareWhostshed, Joyce SS SHARESISSUED, JKND SS SHARESCANCELLED, JOPSEON AS BROCKERIDID, JPY Transceive as money. Where Joyce = 1 and Joyitpe (2,3,4) and (Joyce D & gt; 0 or Joint & gt; 0) and Zoptatty & gt; = '20000302' and joefdt & lt; = '20000302' ORDER BY joefdt; Set the character string from one character to another in the Oracle Convert function. It is used to change the time (the broadest sense what's this?) Or knows something Oracle SQL_DATE and SQL_CHAR identifiers do not, so you can not use them in this manner. Finally,  joefdt> = circumstances such as '20000302' suspect I probably means some  joefdt & gt; = DATE '2000-03-02'  


No comments:

Post a Comment