Subject How to find the Min value of a Varchar type data
Author shaamim_ply
Hi experts,
I am doing an inventory s/w using Firebird.I have tried the following
query to select the First record which satisfies the criteria

Select COALESCE(MIN(VC_BILLNO),'NULL') CODE from PURC_BILL_MAST
where NN_YEAR = 2005

but i am not getting the needed answer..
Eg:in my table the values of vc_billno are like this

10/2005-2006
2/2005-2006
3/2005/2006
9/2005-2006

and i want to get the result 2/2005-2006 when using the "MIN function"
But notgetting the right one.
NB:vc_billno is declared as varchar type

Hope u understand the problem, i am new in firebird..i expect ur
valuable sugestions..
Thanx
shaamim