[Home] [Help]
3551: sum(to_number(cl.meaning)*(1-(sysdate-a.creation_date)/l_time_usage))
3552: +
3553: (l_avg_score * ( 1 - (sysdate - c.last_update_date)/l_time_usage) )
3554: ) + c.usage_score
3555: from cs_kb_set_links a, cs_lookups cl
3556: where a.set_id = c.set_id
3557: and a.link_type = cl.lookup_code
3558: and cl.lookup_type = 'CS_KB_USAGE_TYPE_WEIGHT'
3559: and a.creation_date >= (sysdate - l_time_usage)
3564: where c.status = 'PUB'
3565: and c.last_update_date > (sysdate-l_time_usage)
3566: and exists (
3567: select null
3568: from cs_kb_set_links a, cs_lookups cl
3569: where a.set_id = c.set_id
3570: and a.link_type = cl.lookup_code
3571: and cl.lookup_type = 'CS_KB_USAGE_TYPE_WEIGHT'
3572: and a.creation_date >= (sysdate - l_time_usage)
3608: update cs_kb_sets_b c set usage_score =
3609: (
3610: select round(sum(to_number(cl.meaning)*(1-(sysdate-a.creation_date)/l_time_usage))
3611: ) + c.usage_score
3612: from cs_kb_set_links a, cs_lookups cl
3613: where a.set_id = c.set_id
3614: and a.link_type = cl.lookup_code
3615: and cl.lookup_type = 'CS_KB_USAGE_TYPE_WEIGHT'
3616: and a.creation_date >= (sysdate - l_time_usage)
3621: where c.status = 'PUB'
3622: and c.last_update_date <= (sysdate-l_time_usage)
3623: and exists (
3624: select null
3625: from cs_kb_set_links a, cs_lookups cl
3626: where a.set_id = c.set_id
3627: and a.link_type = cl.lookup_code
3628: and cl.lookup_type = 'CS_KB_USAGE_TYPE_WEIGHT'
3629: and a.creation_date >= (sysdate - l_time_usage)