Board index » delphi » what is wrong? (SQL Statement)

what is wrong? (SQL Statement)

I use this SQL statement for finding next available user ID and is working
fine with MS-SQL Server:

SELECT
    MAX(CONVERT(int, ID)) AS NewID
FROM
    Users
WHERE
   (ISNUMERIC(ID) = 1)  AND (CONVERT(int,ID) >=10000)

Why on Interbase is doesn't work ?
I got : "Token unknown - line 2, char 15"

Why ?

Thank you,
-Ioan

 

Re:what is wrong? (SQL Statement)


never mind:-))

This one is work fine:
SELECT MAX(ID) AS NewID FROM  Users WHERE ID >=10000

Quote
Ioan Ghip <i...@pangea-comm.com> wrote in message

news:881ufs$ejg6@bornews.borland.com...
Quote
> I use this SQL statement for finding next available user ID and is working
> fine with MS-SQL Server:

> SELECT
>     MAX(CONVERT(int, ID)) AS NewID
> FROM
>     Users
> WHERE
>    (ISNUMERIC(ID) = 1)  AND (CONVERT(int,ID) >=10000)

> Why on Interbase is doesn't work ?
> I got : "Token unknown - line 2, char 15"

> Why ?

> Thank you,
> -Ioan

Other Threads