473,399 Members | 3,832 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

MS Sql Error converting data type varchar to numeric.

1
seems to be a problem in my first case stmt here i need to convert this and i dont know how, hope somebody can help me out

select distinct top 10

tplan.plan_long_nm,
asset.ast_cntr_pol_num,
'As of Date' = convert(varchar(12),val.pcov_vlu_asof_dt,101),
'Cash Surrender Value' = val.pcov_cash_sur_amt,
'MVA Index Value / Account Value' = case when grp.prem_pmt_typ_cd in ('FPDA', 'NA') then 'needs mapping' else null end,--These values will only exist for KeyIndexFlex and KeySelect products.
'SNFL Adjustment Amount' = 'needs mapping', --not sure if the same rule applies for this as in the previous value
'Minimum Guaranteed Int Rate' = fixed.fxfund_guar_rt,
'Int Since Beg of Term' = fia.fia_int_earn_amt, -- + <Int Since Last Anniv>,
'Death Benefit Reduction' = dben.db_reduc_typ_dsc,
'Max Withdrawal Amount' = case when tplan.PLAN_LONG_NM in ('KEYSELECT','KEYINDEX FLEX') then 'N/A'
when grp.prem_pmt_typ_cd = 'SPDA' then (val.pcov_cash_sur_amt - 4000) else '0.00' end,
--NOTE ON MAX WITH AMOUNT IF grp.prem_pmt_typ_cd = 'SPDA' AND THE CALCULATION RESULTS IN A NEGATIVE ANSWER THEN JUST DISPLAY 0.00
'Mouseover' = case when grp.prem_pmt_typ_cd = 'SPDA' then 'Maximum withdrawal amount to leave contract open, this value leaves $4000 in the surrender value'
when tplan.PLAN_LONG_NM = 'KEYINDEX FLEX' then '$4000 must remain in the surrender value and $1000 must remain in each Indexed bucket'
when tplan.PLAN_LONG_NM = 'KEYSELECT' then '$2500 must remain in the account value' else null end

from [sv3535].[EntIntRepos1_qa].[dbo].[asset_t] asset

inner join [sv3535].[AnnTrRep1_qa].[dbo].[tr_policy_cov_t] policycov on asset.ast_src_id = policycov.pol_id and policycov.pcov_cov_seq_num = asset.ast_src_seq_num
inner join [sv3535].[AnnTrRep1_qa].[dbo].[tr_policy_cov_value_t] val on policycov.pol_id = val.pol_id and policycov.pcov_cov_seq_num = val.pcov_cov_seq_num
inner join [sv3535].[AnnTrRep1_qa].[dbo].[pcov_fixed_fund_rate_t] fixed on policycov.pol_id = fixed.pol_id
and fixed.pcov_cov_seq_num = policycov.pcov_cov_seq_num
inner join [sv3535].[AnnTrRep1_qa].[dbo].[pcov_fia_dtl_t] fia on policycov.pol_id = fia.pol_id and policycov.pcov_cov_seq_num = fia.pcov_cov_seq_num
inner join [sv3535].[AnnTrRep1_qa].[dbo].[tr_plan_t] tplan on policycov.plan_id = tplan.plan_id
inner join [sv3535].[AnnTrRep1_qa].[dbo].[dthben_reduc_type_t] dben on tplan.db_reduc_typ_cd = dben.db_reduc_typ_cd
inner join [sv3535].[AnnTrRep1_qa].[dbo].[product_cat_t] prod on tplan.prod_cat_cd = prod.prod_cat_cd
left outer join [sv3535].[EntIntRepos1_qa].[dbo].[product_group_t] grp on asset.ast_stat_cd = grp.ast_styp_cd


where asset.ast_cntr_pol_num like 'KA12545362'
and asset.data_src_cd = 'TRANSCND'
and prod.prod_cat_dsc = 'Indexed'
Nov 20 '07 #1
0 1357

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Amir | last post by:
Hi all, I have a table called PTRANS with few columns (see create script below). I have created a view on top that this table VwTransaction (See below) I can now run this query without a...
1
by: Jay | last post by:
I hope this is the correct place to post this. I'm using a stored procedure to simply look up and return a value from a database. The db key is an integer, everything else is varchar. The stored...
4
by: Viktor Popov | last post by:
Hi, I'm trying to execute stored procedure and I collect its parameters from WebForm. There is an error: Error converting data type varchar to int. What could be the problem? Here it is the...
2
by: Leon Shaw | last post by:
Please help me understand this Error??? Server Error in '/solo' Application. ---------------------------------------------------------------------------- ---- Object must implement...
1
by: luna | last post by:
got so far then it broke and i cant get it working again - it was updating fine but not inserting and now im getting a "Error converting data type varchar to numeric" which i didnt have before.......
13
by: dbuchanan | last post by:
Hello, Here is the error message; ---------------------------- Exception Message: ForeignKeyConstraint Lkp_tbl040Cmpt_lkp302SensorType requires the child key values (5) to exist in the...
0
by: rajmgopal | last post by:
Hello Everyone I am getting the following error when i try to insert a record into Sql Server 2005 from my VB 2005 application. sqlEx = {"Error converting data type numeric to numeric."} I...
3
by: othellomy | last post by:
select convert(float,'1.2334e+006') 1233400.0 select convert(decimal(20,2),'1.2334e+006') Server: Msg 8114, Level 16, State 5, Line 1 Error converting data type varchar to numeric. can I set...
0
by: jjtechy | last post by:
The data like 0.06234 that is imported from another server is getting changed as 6.234....E-2 in my local.it is looking as 0.06234 in that server.The datatype of that column is varchar(50) in both...
3
by: lornab | last post by:
Hi I wonder if anyone can help - I think the answer is simple but it's been a really long day and I need to get this done!! My select statement goes like this... SELECT client, ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.