Software Development : A dizzy job...keeping abreast and being competitive is a 24X7 involvement
Jan 31, 2005
Jan 24, 2005
Jan 11, 2005
Jan 10, 2005
Generating radio buttion from Stored proc
----------------Case demonstration----------------------------
SELECT RTRIM(insured.ins_name) 'Insured Name',
ins_short_desc 'Type',
ins_type,
policy.Quote_Number 'Quote No',
case when (policy.rejected_flg =1) then 'rejected'
when (policy.cancelled_flag=1) then 'cancelled'
when (policy.RENEWAL_FLAG=1) then 'renewal'
when (policy.bound_date is not null) then 'bound'
end
FROM Table_Name where Where Condition
----------------------------------------------------------------------------------
--------------------Radio button genration--------------------------------
select '' 'Select',
[Insured Name],
[Type],
[Quote No],
' ' ' ',
[Transaction Status],
[Policy No],
(case
when( (
select count(*)
from policy_docs pd
where pd.policy_id = tq.policy_id
and doc_type in ('policy','state_cert','reg'))>0) then
' ' end )' ',
[Effective Date]
from #tmp_query tq
where
( ltrim(@status) = ltrim([Transaction Status])
or @status is null )
and ( ins_type = @ins_type
or @ins_type is null)
and ( [Insured Name] like '%'+@ins_names+'%'
or @ins_names is NULL)
and ( [Policy No] = @policy_id
or @policy_id is null )
and ( [Quote No] = @quote_id
or @quote_id is null)
and ( broker_id=@broker_id
or @broker_id is null)
and ( [Effective Date] = @effective_date
or @effective_date is null)
order by
policy_id desc
drop table #tmp_query--------------------------------------------------------
Jan 9, 2005
Subscribe to:
Posts (Atom)