<div>Hi,</div>
<div> </div>
<div>I am not sure wether this is the right palce to ask this question i have a simple query related to sql sever data type converstion</div>
<div> </div>
<div>Actually i have developed an application using delphi5 and sql sever 2000. Now my problem is when i dveloped the application i have used varchar in many places as datatype for the column of the table. Now my cleitn wants to sue as user defined datatype. </div>
<div> </div>
<div>That before i had value as string</div>
<div>ex:</div>
<div>l1 := 'vikas';</div>
<div> </div>
<div>str := 'cast(l1 as varchar(2))'</div>
<div> </div>
<div>this was fine</div>
<div> </div>
<div>now i have datatype as user defined</div>
<div> </div>
<div>say user_type(varchar)</div>
<div> </div>
<div>now anyone knwos how to cast it</div>
<div> </div>
<div>when i tried</div>
<div> </div>
<div><strong>cast('vikas' as user_type(varchar)(2))</strong></div>
<div><strong></strong> </div>
<div> </div>
<div> </div>
<div>it dint worked</div>
<div> </div>
<div>i know the casting system or soemthign is wrong</div>
<div> </div>
<div>i am not sure where i am going wrong.</div>
<div> </div>
<div>Please anyone guide me thought it. I will really apreciate it</div>
<div> </div>
<div>Regards</div>
<div>Vikas</div>
<div>Solution consultant</div>
<div>National cash register</div>
<div><a href="http://www.ncr.com">www.ncr.com</a></div>
<div><br clear="all"><br>-- <br> vikas </div>