Subject | Simple Firbird syntax error |
---|---|
Author | edmstrflsh |
Post date | 2009-10-09T16:22:54Z |
All,
Im new to Firebird and am trying to create a simple paramaterized proceedure. I am interfaceing with an EasyIP database and need a little help. My code is thus...
-------------------------------------------------
CREATE PROCEDURE MySP (subnetmask char(128))
AS
BEGIN
SELECT
a.IP_ADDRESS, a.SUBNET, a.CIDR_MASK, a.IP_VERSION, a.SHORT_IP_ADDRESS, a.ALIVE, a.MAC_ADDRESS, a.ADDRESS_TYPE, a.DEVICE_TYPE, a.REPLICATED_FROM, a.HOST_NAME, a.OWNER, a.LOCATION, a.TELEPHONE_NUMBER, a.EMAIL_ADDRESS, a.NOTES, a.DNS_NAME, a.SYSTEM_NAME, a.CLIENT_MNEMONIC, a.SERIAL_NUMBER
FROM
ADDRESSES a
WHERE
SUBNET = :subnetmask
ORDER BY
IP_ADDRESS;
END
-------------------------------------------------------
My Dev enviroment is RazorSQL and anytime i try to execute that create statment I get the following error (Line 11 is IP_ADDRESS;)...
ERROR: GDS Exception. 335544569. Dynamic SQL Error
SQL error
code = -104
Token unknown - line 11, column 13
;
Query = CREATE
PROCEDURE Eddie (subnetmask char(128))
AS
BEGIN
SELECT
a.IP_ADDRESS, a.SUBNET, a.CIDR_MASK, a.IP_VERSION, a.SHORT_IP_ADDRESS,
a.ALIVE, a.MAC_ADDRESS, a.ADDRESS_TYPE, a.DEVICE_TYPE,
a.REPLICATED_FROM, a.HOST_NAME, a.OWNER, a.LOCATION,
a.TELEPHONE_NUMBER, a.EMAIL_ADDRESS, a.NOTES, a.DNS_NAME,
a.SYSTEM_NAME, a.CLIENT_MNEMONIC, a.SERIAL_NUMBER
FROM
ADDRESSES a
WHERE
SUBNET = :subnetmask
ORDER BY
IP_ADDRESS;
END
If I remove the last semicolon I get the same error but one line has changed...
Token unknown - line 12, column 1 (line 12 is END)
Any help is greatly appreciated.
Eddie Dressler
DBA
Cerner Corporation
Im new to Firebird and am trying to create a simple paramaterized proceedure. I am interfaceing with an EasyIP database and need a little help. My code is thus...
-------------------------------------------------
CREATE PROCEDURE MySP (subnetmask char(128))
AS
BEGIN
SELECT
a.IP_ADDRESS, a.SUBNET, a.CIDR_MASK, a.IP_VERSION, a.SHORT_IP_ADDRESS, a.ALIVE, a.MAC_ADDRESS, a.ADDRESS_TYPE, a.DEVICE_TYPE, a.REPLICATED_FROM, a.HOST_NAME, a.OWNER, a.LOCATION, a.TELEPHONE_NUMBER, a.EMAIL_ADDRESS, a.NOTES, a.DNS_NAME, a.SYSTEM_NAME, a.CLIENT_MNEMONIC, a.SERIAL_NUMBER
FROM
ADDRESSES a
WHERE
SUBNET = :subnetmask
ORDER BY
IP_ADDRESS;
END
-------------------------------------------------------
My Dev enviroment is RazorSQL and anytime i try to execute that create statment I get the following error (Line 11 is IP_ADDRESS;)...
ERROR: GDS Exception. 335544569. Dynamic SQL Error
SQL error
code = -104
Token unknown - line 11, column 13
;
Query = CREATE
PROCEDURE Eddie (subnetmask char(128))
AS
BEGIN
SELECT
a.IP_ADDRESS, a.SUBNET, a.CIDR_MASK, a.IP_VERSION, a.SHORT_IP_ADDRESS,
a.ALIVE, a.MAC_ADDRESS, a.ADDRESS_TYPE, a.DEVICE_TYPE,
a.REPLICATED_FROM, a.HOST_NAME, a.OWNER, a.LOCATION,
a.TELEPHONE_NUMBER, a.EMAIL_ADDRESS, a.NOTES, a.DNS_NAME,
a.SYSTEM_NAME, a.CLIENT_MNEMONIC, a.SERIAL_NUMBER
FROM
ADDRESSES a
WHERE
SUBNET = :subnetmask
ORDER BY
IP_ADDRESS;
END
If I remove the last semicolon I get the same error but one line has changed...
Token unknown - line 12, column 1 (line 12 is END)
Any help is greatly appreciated.
Eddie Dressler
DBA
Cerner Corporation