>hi friends
>
>
>Bill_no- fird name
>12344AAAA
>aaa12340
>111111
>
>select max(cast(bill_no as int)) from table1
>select cast(max(bill_no) as int) from table1
>
>Error Occured
>Server: Msg 245, Level 16, State 1, Line 1
>Syntax error converting the varchar value '123aaaa' to a column of data type int.
>
>where i wrong
>pls help me
>how can i calc maximum bill_no
select max(bill_no) from table1
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.