<div>Hi,</div>
<div>&nbsp;</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>&nbsp;</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>&nbsp;</div>
<div>That before i had value as string</div>
<div>ex:</div>
<div>l1 := &#39;vikas&#39;;</div>
<div>&nbsp;</div>
<div>str := &#39;cast(l1 as varchar(2))&#39;</div>
<div>&nbsp;</div>
<div>this was fine</div>
<div>&nbsp;</div>
<div>now i have datatype as user defined</div>
<div>&nbsp;</div>
<div>say user_type(varchar)</div>
<div>&nbsp;</div>
<div>now anyone knwos how to cast it</div>
<div>&nbsp;</div>
<div>when i tried</div>
<div>&nbsp;</div>
<div><strong>cast(&#39;vikas&#39; as user_type(varchar)(2))</strong></div>
<div><strong></strong>&nbsp;</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>it dint worked</div>
<div>&nbsp;</div>
<div>i know the casting system or soemthign is wrong</div>
<div>&nbsp;</div>
<div>i am not sure where i am going wrong.</div>
<div>&nbsp;</div>
<div>Please anyone guide me thought it. I will really apreciate it</div>
<div>&nbsp;</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>&nbsp;&nbsp;vikas </div>