dibujohn
10-12-2004, 09:38 AM
Help me to solve.. thankx is advance...
I'm using mysql 4.23.56 max-log. I have done a project with mysql as Back-end. Around 2 lakhs records are there there in my database. But now a days in the MAX() queries -which used to generate the ID- frequently I'm getting Invalid values. That means a big number than what the original Max value is.
The Query that I'm useing is :
SELECT MAX(TRUNCATE(MID('BillNo',2 ,LENGTH('BillNo')) , 0)) AS MAXID FROM Sales_M WHERE BillNo LIKE 'R/%'
Here ,
BillNo is Varchar(20),
R/ indicates RetailSales Bills
W/ indicates WoleSales Bills
My database is running in Red Hat Linux 8. What extra should I do..?
I want a permanent solution...!
Im thanking u to spent time to help me...
I'm using mysql 4.23.56 max-log. I have done a project with mysql as Back-end. Around 2 lakhs records are there there in my database. But now a days in the MAX() queries -which used to generate the ID- frequently I'm getting Invalid values. That means a big number than what the original Max value is.
The Query that I'm useing is :
SELECT MAX(TRUNCATE(MID('BillNo',2 ,LENGTH('BillNo')) , 0)) AS MAXID FROM Sales_M WHERE BillNo LIKE 'R/%'
Here ,
BillNo is Varchar(20),
R/ indicates RetailSales Bills
W/ indicates WoleSales Bills
My database is running in Red Hat Linux 8. What extra should I do..?
I want a permanent solution...!
Im thanking u to spent time to help me...
