Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
rwasim25
Starting Member
13 Posts |
Posted - 2010-08-26 : 03:27:10
|
Please consider the below:there is a rule in my data migration project which says..If CCIETEC = '74' in CNV_Policy_Version then default to 'N/A'If CCIETEC in( '70','85') in CNV_Policy_Version (i.e for Belgium policies) then use below.select nave from simm_tbyversi need to capture the result in "Endorsement_Number" field. please helpWasim..Senior Test Engineer |
|
rwasim25
Starting Member
13 Posts |
Posted - 2010-08-26 : 03:50:17
|
(select case when CNV.CCIETEC = '74' then 'NA' when CNV.CCIETEC in ('70','85') then (select nave from simm_tbyvers) end) 'Endorsement_Number' from CNV_Policy_Version CNVthis is giving error...Wasim..Senior Test Engineer |
 |
|
pk_bohra
Master Smack Fu Yak Hacker
1182 Posts |
Posted - 2010-08-26 : 04:20:28
|
Syntax error corrected.select case when CNV.CCIETEC = '74' then 'NA'when CNV.CCIETEC in ('70','85') then (select nave from simm_tbyvers)end 'Endorsement_Number' from CNV_Policy_Version CNV (select nave from simm_tbyvers) :- Will this table have only single record ?Regards,BohraI am here to learn from Masters and help new bees in learning. |
 |
|
rwasim25
Starting Member
13 Posts |
Posted - 2010-08-26 : 04:29:42
|
(The syntax is now corrected..) Hi this is giving multiple identifier error.. may be the reason is simm_tbyvers, in the field the client want only the nave column value from simm_tbyvers.we have more records to be displayed from the CNV_Policy_Version table but the link in the above query is only one for table simm_tbyversWasim..Senior Test Engineer |
 |
|
rwasim25
Starting Member
13 Posts |
Posted - 2010-08-30 : 01:40:03
|
Hi, I am still strucked in the code.Wasim..Senior Test Engineer |
 |
|
sakets_2000
Master Smack Fu Yak Hacker
1472 Posts |
Posted - 2010-08-30 : 02:18:58
|
You should post sample data and expected output. Nothing is clear from what you have posted above. |
 |
|
|
|
|