CAST and CONVERT to varchar not working

why CAST(account_seq AS char) is compiling fine while CAST(account_seq AS varchar) is not compiling ???

what will be the memsql syntax for this sybase sentence: convert(varchar(8),@bnfcr_seq_nbr)

See SingleStoreDB Cloud · SingleStore Documentation. The CAST function doesn’t fully specify the type - it lets you convert to a general string, not a specific string type. If you want to convert to a specific type, use the :> typecast operator described on that page, e.g. val :> varchar(8).

what about CONVERT, is the same issue with it ?

what will be the memsql syntax for this sybase sentence: CONVERT(varchar(8),@bnfcr_seq_nbr)

Use the :> typecast operator as I described above:

@bnfcr_seq_nbr :> varchar(8)

And CAST and CONVERT are basically the same.

OK got it … Thanks for you help