SQLTeam.com | Weblogs | Forums

Defined values


Hi, all.

I've obviously not gotten enough sleep because I cannot find where a certain value is coming from in some script I've inherited from my predecessor.

insert into Manual.dbo.TOPS_PaymentReq (ssn,tuitpd,stippd,natgrdpd, ACADSTAND )

select distinct s.student_ssn ,
case when sa.fund_ay_token='16318' then sat.scheduled_amount else 0 end,
case when sa.fund_ay_token='16319' then sat.scheduled_amount else 0 end ,
case when us1.value_178 is null then '00' else us1.value_178 end
from student s
join stu_award_year say on s.student_token=say.student_token
join stu_award sa on say.stu_award_year_token=sa.stu_award_year_token
join stu_award_transactions sat on sa.stu_award_token = sat.stu_award_token
join user_string us1 on say.stu_award_year_token=us1.stu_award_year_token
join user_int ui on say.stu_award_year_token=ui.stu_award_year_token

where sa.fund_ay_token in('16318','16319')
and say.award_year_token = 2014
and sat.poe_token = 78
and sat.scheduled_amount >0
and ui.value_01 >0
and us1.value_10='Y'

I can't figure out where the value for "ACADSTAND" is being pulled. I don't see it being selected anywhere. CONFUSED!


Did you check if a trigger exists ?

This is the line that insert the value into ACADSTAND

case when us1.value_178 is null then '00' else us1.value_178  end


Ha! I see this now. THANK YOU!


Glade to help!