sql - ERROR ORA-00905: missing keyword (microsoft ole db provider for oracle) -


can see keyword missing pl/sql query below?

i getting error ora-00905: missing keyword (microsoft ole db provider oracle)

not sure keyword missing - odbc query oracle database

        select "stat"."ord"."sampleid",  max(case when "stat"."ordanael"."mc"='qaers' n"stat"."ordanael"."res_txt" else   '' end)  ersid,  "stat"."ordmcstp_v"."seqnb", "stat"."ord"."ordpatname",   "stat"."ord"."ordpatbirthdt", "stat"."ord"."corordnb", "stat"."ord"."projnb",  max(case when "stat"."ordanael"."mc"='ammol' 'ammol'   when "stat"."ordanael"."mc"='ammolr' 'ammolr' else '' end) test,    max(case when "stat"."ordanael"."mc"='ammol' n"stat"."ordresmcel"."mc_res"  when "stat"."ordanael"."mc"='ammolr' n"stat"."ordresmcel"."mc_res" else ''   end) mc_res,     max( case when "stat"."ordmcstp_v"."stepmc"='amimi' n"stat"."ordmcstpel"."res"   else '' end) imi,   max( case when "stat"."ordmcstp_v"."stepmc"='amimp' n"stat"."ordmcstpel"."res"   else '' end)  imp,   max( case when "stat"."ordmcstp_v"."stepmc"='amndm' n "stat"."ordmcstpel"."res"   else '' end)  ndm,   max( case when "stat"."ordmcstp_v"."stepmc"='amox48'   n "stat"."ordmcstpel"."res" else '' end)  oxa48,   max( case when "stat"."ordmcstp_v"."stepmc"='amspm' n "stat"."ordmcstpel"."res"   else '' end)  spm,   max( case when "stat"."ordmcstp_v"."stepmc"='amvim' n "stat"."ordmcstpel"."res"   else '' end)  vim,   max( case when "stat"."ordmcstp_v"."stepmc"='amdim' n "stat"."ordmcstpel"."res"   else '' end)  dim,   max( case when "stat"."ordmcstp_v"."stepmc"='amkpc' n "stat"."ordmcstpel"."res"   else '' end)  kpc,   max( case when "stat"."ordmcstp_v"."stepmc"='amges' n "stat"."ordmcstpel"."res"   else '' end)  ges,   max( case when "stat"."ordmcstp_v"."stepmc"='amsme' n "stat"."ordmcstpel"."res"   else '' end)  sme,   max( case when "stat"."ordmcstp_v"."stepmc"='amfri1'   n "stat"."ordmcstpel"."res" else '' end)  fri1,   max( case when "stat"."ordmcstp_v"."stepmc"='amsim' n "stat"."ordmcstpel"."res"   else '' end)  sim,   max( case when "stat"."ordmcstp_v"."stepmc"='amgim' n "stat"."ordmcstpel"."res"   else '' end)  gim,    max( case when "stat"."ordanael"."mc"='ammol' n "stat"."ordanael"."valmed" else   '' end)  valmed_ammol,   max( case when "stat"."ordanael"."mc"='ammol' ,   "stat"."ordanael_d"."dfield"='rr' n "stat"."ordanael_d"."dvalue" else '' end)    rpt_dt_ammol,   "stat"."ordanael"."res_st"     (("stat"."ordmcstpel" inner join ("stat"."ordmcstp_v" inner join   ("stat"."ord" inner join "stat"."ordanael" on ("stat"."ord"."lid" =   "stat"."ordanael"."lid") , ("stat"."ord"."lperiod" =   "stat"."ordanael"."lperiod") , ("stat"."ord"."ordnb" =   "stat"."ordanael"."ordnb")) on ("stat"."ordmcstp_v"."lid" = "stat"."ord"."lid")   , ("stat"."ordmcstp_v"."lperiod" = "stat"."ord"."lperiod") ,   ("stat"."ordmcstp_v"."ordnb" = "stat"."ord"."ordnb")) on ("stat"."ordmcstpel"."bc"   = "stat"."ordmcstp_v"."bc") , ("stat"."ordmcstpel"."current_stepnb" =   "stat"."ordmcstp_v"."current_stepnb")) inner join "stat"."ordanael_d" on   ("stat"."ordanael"."nbint" = "stat"."ordanael_d"."dnbint") ,   ("stat"."ordanael"."spseq" = "stat"."ordanael_d"."dspseq") ,   ("stat"."ordanael"."ordnb" = "stat"."ordanael_d"."dordnb") ,   ("stat"."ordanael"."lperiod" = "stat"."ordanael_d"."dlperiod") ,   ("stat"."ordanael"."lid" = "stat"."ordanael_d"."dlid")) inner join   "stat"."ordresmcel" on ("stat"."ordmcstp_v"."seqnb" = "stat"."ordresmcel"."seqnb")   , ("stat"."ordanael"."ordnb" = "stat"."ordresmcel"."ordnb") ,   ("stat"."ordanael"."lperiod" = "stat"."ordresmcel"."lperiod") ,   ("stat"."ordanael"."lid" = "stat"."ordresmcel"."lid")      (("stat"."ord"."lid")='h1')  , (("stat"."ord"."lperiod")>'5200')   , (("stat"."ord"."projnb")='acpoers')    group "stat"."ord"."sampleid", "stat"."ordmcstp_v"."seqnb",   "stat"."ord"."ordpatname", "stat"."ord"."ordpatbirthdt", "stat"."ord"."corordnb",   "stat"."ord"."projnb", "stat"."ordanael"."res_st" having ((("stat"."ordmcstp_v"."seqnb") not null) , (("stat"."ord"."projnb")  ='acpoers') , (("stat"."ordanael"."res_st")>'4')) 

just big comment. cleaned double quotes , n , comes clean in sql formatter.

select      stat.ord.sampleid,             max ( case when stat.ordanael.mc = 'qaers' stat.ordanael.res_txt else '' end ) ersid,             stat.ordmcstp_v.seqnb,             stat.ord.ordpatname,             stat.ord.ordpatbirthdt,             stat.ord.corordnb,             stat.ord.projnb,             max (                   case                       when stat.ordanael.mc = 'ammol' 'ammol'                       when stat.ordanael.mc = 'ammolr' 'ammolr'                       else ''                   end )                 test,             max (                   case                       when stat.ordanael.mc = 'ammol' stat.ordresmcel.mc_res                       when stat.ordanael.mc = 'ammolr' stat.ordresmcel.mc_res                       else ''                   end )                 mc_res,             max ( case when stat.ordmcstp_v.stepmc = 'amimi' stat.ordmcstpel.res else '' end ) imi,             max ( case when stat.ordmcstp_v.stepmc = 'amimp' stat.ordmcstpel.res else '' end ) imp,             max ( case when stat.ordmcstp_v.stepmc = 'amndm' stat.ordmcstpel.res else '' end ) ndm,             max ( case when stat.ordmcstp_v.stepmc = 'amox48' stat.ordmcstpel.res else '' end ) oxa48,             max ( case when stat.ordmcstp_v.stepmc = 'amspm' stat.ordmcstpel.res else '' end ) spm,             max ( case when stat.ordmcstp_v.stepmc = 'amvim' stat.ordmcstpel.res else '' end ) vim,             max ( case when stat.ordmcstp_v.stepmc = 'amdim' stat.ordmcstpel.res else '' end ) dim,             max ( case when stat.ordmcstp_v.stepmc = 'amkpc' stat.ordmcstpel.res else '' end ) kpc,             max ( case when stat.ordmcstp_v.stepmc = 'amges' stat.ordmcstpel.res else '' end ) ges,             max ( case when stat.ordmcstp_v.stepmc = 'amsme' stat.ordmcstpel.res else '' end ) sme,             max ( case when stat.ordmcstp_v.stepmc = 'amfri1' stat.ordmcstpel.res else '' end ) fri1,             max ( case when stat.ordmcstp_v.stepmc = 'amsim' stat.ordmcstpel.res else '' end ) sim,             max ( case when stat.ordmcstp_v.stepmc = 'amgim' stat.ordmcstpel.res else '' end ) gim,             max ( case when stat.ordanael.mc = 'ammol' stat.ordanael.valmed else '' end )                 valmed_ammol,             max ( case                      when     stat.ordanael.mc = 'ammol'                           , stat.ordanael_d.dfield = 'rr'                          stat.ordanael_d.dvalue                      else                          ''                  end )                 rpt_dt_ammol,             stat.ordanael.res_st        ((stat.ordmcstpel               inner join (stat.ordmcstp_v                           inner join (stat.ord                                       inner join stat.ordanael                                           on     ( stat.ord.lid = stat.ordanael.lid )                                              , ( stat.ord.lperiod = stat.ordanael.lperiod )                                              , ( stat.ord.ordnb = stat.ordanael.ordnb ))                               on     ( stat.ordmcstp_v.lid = stat.ord.lid )                                  , ( stat.ordmcstp_v.lperiod = stat.ord.lperiod )                                  , ( stat.ordmcstp_v.ordnb = stat.ord.ordnb ))                   on     ( stat.ordmcstpel.bc = stat.ordmcstp_v.bc )                      , ( stat.ordmcstpel.current_stepnb = stat.ordmcstp_v.current_stepnb ))              inner join stat.ordanael_d                  on     ( stat.ordanael.nbint = stat.ordanael_d.dnbint )                     , ( stat.ordanael.spseq = stat.ordanael_d.dspseq )                     , ( stat.ordanael.ordnb = stat.ordanael_d.dordnb )                     , ( stat.ordanael.lperiod = stat.ordanael_d.dlperiod )                     , ( stat.ordanael.lid = stat.ordanael_d.dlid ))             inner join stat.ordresmcel                 on     ( stat.ordmcstp_v.seqnb = stat.ordresmcel.seqnb )                    , ( stat.ordanael.ordnb = stat.ordresmcel.ordnb )                    , ( stat.ordanael.lperiod = stat.ordresmcel.lperiod )                    , ( stat.ordanael.lid = stat.ordresmcel.lid )           ( ( stat.ord.lid ) = 'h1' )             , ( ( stat.ord.lperiod ) > '5200' )             , ( ( stat.ord.projnb ) = 'acpoers' ) group    stat.ord.sampleid,             stat.ordmcstp_v.seqnb,             stat.ord.ordpatname,             stat.ord.ordpatbirthdt,             stat.ord.corordnb,             stat.ord.projnb,             stat.ordanael.res_st having      (    ( ( stat.ordmcstp_v.seqnb ) not null )              , ( ( stat.ord.projnb ) = 'acpoers' )              , ( ( stat.ordanael.res_st ) > '4' ) ); 

Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -