I'm new to Firebird, and I'm having particular difficulty translating this T-SQL to Firebird SQL. This code is stored outside of the database, not in a stored procedure.
DECLARE @NumTotal int
DECLARE @NumUsed int
SELECT @NumTotal = COUNT(*)
FROM "some_Table"
WHERE "CreatedOn"=@CreatedOn
SELECT @NumUsed = COUNT(*)
FROM "some_Table"
WHERE "CreatedOn"=@CreatedOn AND "UserID" IS NOT NULL
SELECT @NumUsed AS "NumUsed", @NumTotal AS "NumTotal"
I guess from the errors and my experimentation that I'm basically forced to put this into a stored procedure somehow. Is there a way I can do this while still keeping the code out of the database?