Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: SQL2000 VB.NET
i have a patient number 1
If patient=Normal then
series is of type
ln00001
 
If patient=LAMAthen
series is of type
L00001
Posted 5-Dec-12 19:10pm
ankur7891.4K
Edited 5-Dec-12 23:31pm
v4

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

considering a table named as - 'table_name'
and having columns- 'Patient_Type', 'Patient_ID'
 
i will suggest the following solution
 
select 
result=case Patient_Type 
       when 'Normal' then 'ln0000'+Patient_ID 
       when 'LAMA' then 'L0000'+Patient_ID 
       end
       from table_name 
 
Please check and mask as answer if it works.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web04 | 2.8.150302.1 | Last Updated 6 Dec 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100