Jump to content

Sql Help....


Recommended Posts

Posted

with parents as (
select
  adc.id as entity_id,
  adc.type_id as published_id,
  em_parents.migratable_reference as content_id
from AKDC_DYNAMIC_CONTENT adc
inner join
    (select em.ENTITY_ID, em.migratable_reference from EVA_MIGRATABLE em
      where em.migratable_reference in
        (select edefv.field_value from eva_dynamic_entity_field_value edefv
          where edefv.DYN_ENTITY_FIELD_ID =
            (select edef.id from eva_entity_definition eed, eva_dynamic_entity_field edef
              where
                eed.id = edef.ENTITY_DEF_ID
                and eed.name = 'KnowledgeBusinessFAQED'
                and edef.name = 'bfaqparentId')
            and edefv.FIELD_VALUE is not null
            and edefv.field_value like 'KB%')
      and em.IS_DELETED = 'N') em_parents
  on em_parents.entity_id = adc.id)
 update AKDC_DYNAMIC_CONTENT set  last_modified_date =
               (SELECT (SYSDATE - TO_DATE('01-01-1970 00:00:00', 'DD-MM-YYYY HH24:MI:SS')) * 24 * 60 * 60 * 1000 FROM DUAL)
    where EVA_DYNAMIC_ENTITY_ID in
        (SELECT eva_dynamic_entity_id from EVA_DYNAMIC_ENTITY_FIELD_VALUE where FIELD_VALUE in (select content_id from parents))

 

 

 

 

idhi run chestrhuntey ila error vasthondhi,....

 

Error: ORA-00928: missing SELECT keyword

SQLState:  42000
ErrorCode: 928

 

 

 

What can be the reason?

Posted

with parents as (
select
  adc.id as entity_id,

  adc.type_id as published_id,

  em_parents.migratable_reference as content_id
from AKDC_DYNAMIC_CONTENT adc
inner join
    (select em.ENTITY_ID, em.migratable_reference from EVA_MIGRATABLE em
      where em.migratable_reference in
        (select edefv.field_value from eva_dynamic_entity_field_value edefv
          where edefv.DYN_ENTITY_FIELD_ID =
            (select edef.id from eva_entity_definition eed, eva_dynamic_entity_field edef
              where
                eed.id = edef.ENTITY_DEF_ID
                and eed.name = 'KnowledgeBusinessFAQED'
                and edef.name = 'bfaqparentId')
            and edefv.FIELD_VALUE is not null
            and edefv.field_value like 'KB%')
      and em.IS_DELETED = 'N') em_parents
  on em_parents.entity_id = adc.id)

 

ikkadaaka run chesi chudu...avthundaa ledha check cheyi?

Posted

merge into parents(cte) a using AKDC_DYNAMIC_CONTENT b 

on

(

a.entity_id = b.entity_id

and .....

)

when matched then update

set 

.

.

.

...

Posted

with parents as (
select
  adc.id as entity_id,

  adc.type_id as published_id,

  em_parents.migratable_reference as content_id
from AKDC_DYNAMIC_CONTENT adc
inner join
    (select em.ENTITY_ID, em.migratable_reference from EVA_MIGRATABLE em
      where em.migratable_reference in
        (select edefv.field_value from eva_dynamic_entity_field_value edefv
          where edefv.DYN_ENTITY_FIELD_ID =
            (select edef.id from eva_entity_definition eed, eva_dynamic_entity_field edef
              where
                eed.id = edef.ENTITY_DEF_ID
                and eed.name = 'KnowledgeBusinessFAQED'
                and edef.name = 'bfaqparentId')
            and edefv.FIELD_VALUE is not null
            and edefv.field_value like 'KB%')
      and em.IS_DELETED = 'N') em_parents
  on em_parents.entity_id = adc.id)

 

ikkadaaka run chesi chudu...avthundaa ledha check cheyi?

 

 

values emi levu ga ga bhayya run avvadhu...

 

with parents as (
select
  adc.id as entity_id,
  adc.type_id as published_id,
  em_parents.migratable_reference as content_id
from AKDC_DYNAMIC_CONTENT adc
inner join
    (select em.ENTITY_ID, em.migratable_reference from EVA_MIGRATABLE em
      where em.migratable_reference in
        (select edefv.field_value from eva_dynamic_entity_field_value edefv
          where edefv.DYN_ENTITY_FIELD_ID =
            (select edef.id from eva_entity_definition eed, eva_dynamic_entity_field edef
              where
                eed.id = edef.ENTITY_DEF_ID
                and eed.name = 'KnowledgeBusinessFAQED'
                and edef.name = 'bfaqparentId')
            and edefv.FIELD_VALUE is not null
            and edefv.field_value like 'KB%')
      and em.IS_DELETED = 'N') em_parents
  on em_parents.entity_id = adc.id)
select * from  AKDC_DYNAMIC_CONTENT
    where EVA_DYNAMIC_ENTITY_ID in
        (SELECT eva_dynamic_entity_id from EVA_DYNAMIC_ENTITY_FIELD_VALUE where FIELD_VALUE in (select content_id from parents))

 

 

ila run chesthontey i am able to get the results

Posted

select vadithey run avuthondhi update vaduthuntey avvadam ledhu....... chala chiragga undhi

Posted

merge into parents(cte) a using AKDC_DYNAMIC_CONTENT b 

on

(

a.entity_id = b.entity_id

and .....

)

when matched then update

set 

.

.

.

...

 

ardham kaledhu bhayya

Posted

select vadithey run avuthondhi update vaduthuntey avvadam ledhu....... chala chiragga undhi

aa update deggarey edo mathlab undhi ..

 

select run avakapodam enti ? values ..endhuk raatledhu ?

Posted

Calling SQL Guru Love Vuncle... LoveIndia ekada unna ikada prathyaksham avaham gaka 

Posted

inkosari na id vaadithe draayer lo saaman miss aithadhi..

ne id edi endi thamari bondhas

Posted

aa update deggarey edo mathlab undhi ..

 

select run avakapodam enti ? values ..endhuk raatledhu ?

 

antey values anni kindha rasina select statement nunchey theesukuntunnamu andhukey ravadam ledhu...

×
×
  • Create New...