How can I track the use of legends?
Teradata Teradata Discussion Forums Teradata.com Discussion Forum
Visit Teradata.com
Home       Guidelines    Member List
Welcome Guest ( Login | Register )
        


This online forum is for user-to-user discussions of Teradata products, and is not an official customer support channel for Teradata. If you require direct assistance, please contact Teradata support.


How can I track the use of legends? Expand / Collapse
Author
Message
Posted 10/2/2006 5:34:35 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 10/12/2006 5:47:00 PM
Posts: 2, Visits: 1
We have many legends available, and I would like to determine which ones are being referenced in campaigns and how often. Is there a simple way to do this in the GUI, or a query anyone has already written to obtain this information.

Thanks,
Ryan
Post #5367
Posted 10/12/2006 9:11:28 AM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member

Group: Moderators
Last Login: 7/21/2008 2:27:50 PM
Posts: 24, Visits: 9
Dear Ryan,
Thank you for your post. I have forwarded your question on to one of our subject matter experts to answer. Will follow up to ensure an answer gets posted. Carol
Post #5503
Posted 10/12/2006 3:11:01 PM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member

Group: Moderators
Last Login: 7/21/2008 2:27:50 PM
Posts: 24, Visits: 9
One option:

select
  key8_id lgnd_mast_id
, key9_desc lgnd_name
, key10_id lgnd_det_id
, count(*) usage
from ios_cc_det
where sel_typ_cd = 'ESG'
and key7_id = 'L'
group by 1,2,3
 
Key8_id contains the lgnd_mast_id and key10_id contains lgnd_det_id


Another option on its way...
Post #5512
Posted 10/12/2006 3:12:40 PM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member

Group: Moderators
Last Login: 7/21/2008 2:27:50 PM
Posts: 24, Visits: 9
Two more suggestions:

Have a look over the ios_cc_det table and sample SQLs belows.
 
1) Legend used in each segment
 
Select T1.ecamp_id
      ,T1.ecamp_nm
      ,T2.seg_id
      ,T2.seg_nm
      ,T3.key8_id as "Legend id"
      ,T3.key9_desc "Legend_desc"
      ,count(T3.key8_id)
  >From ios_ecamp as T1
       Left outer join ios_ecamp_x_seg as T2
       On T1.div_id =  T2.div_id and
          T1.ecamp_id = T2.ecamp_id
       Left Outer Join ios_cc_det as T3
       On T2.usr_sett_id = T3.sett_id and
          T3.sel_typ_cd = 'ESG' and
          T3.key7_id = 'L'
group by 1,2,3,4,5,6
order by 1,3,5
 
2) Legend & Ranges used in each segment
 
Select T1.ecamp_id
      ,T1.ecamp_nm
      ,T2.seg_id
      ,T2.seg_nm
      ,T3.key8_id as "Legend id"
      ,T3.key9_desc "Legend_desc"
      ,T3.key15_desc "Legend range"
      ,count(T3.key8_id)
  From ios_ecamp as T1
       Left outer join ios_ecamp_x_seg as T2
       On T1.div_id =  T2.div_id and
          T1.ecamp_id = T2.ecamp_id
       Left Outer Join ios_cc_det as T3
       On T2.usr_sett_id = T3.sett_id and
          T3.sel_typ_cd = 'ESG' and
          T3.key7_id = 'L'
group by 1,2,3,4,5,6,7
order by 1,3,5,7
Post #5513
Posted 10/12/2006 4:53:15 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 10/12/2006 5:47:00 PM
Posts: 2, Visits: 1
Thank you very much, Carol.

If anyone's interested, I modified one of those queries (below) to return id's and names of all folders, campaigns, segments, legends, and legend ranges. It's nice to be able to quickly locate a legend.

Ryan


sel a.fldr_id
, a.fldr_nm
, b.ecamp_id
, b.ecamp_nm
, b.ecamp_cps_run_dt
, c.seg_id
, c.seg_nm
, d.key8_id as Legend_ID
, d.key9_desc as Legend_Desc
, d.key15_desc as Legend_Range
from ios_fldrs a
inner join ios_ecamp b on a.fldr_id = b.fldr_id
left join ios_ecamp_x_seg c on b.div_id = c.div_id
and b.ecamp_id = c.ecamp_id
left join ios_cc_det d on c.usr_sett_id = d.sett_id
and d.sel_typ_cd = 'ESG'
and d.key7_id = 'L'
where legend_desc is not null
group by 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
order by legend_desc, seg_nm, b.ecamp_nm, a.fldr_nm;
Post #5515
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 7 ( 7 guests, 0 members, 0 anonymous members )
No members currently viewing this topic.


All times are GMT -5:00, Time now is 6:42pm

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.031. 7 queries. Compression Disabled.