Subject | Re: [firebird-support] Simple Firbird syntax error |
---|---|
Author | Martijn Tonies |
Post date | 2009-10-09T16:32:47Z |
Hi,
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!
Database questions? Check the forum:
http://www.databasedevelopmentforum.com
> Im new to Firebird and am trying to create a simple paramaterizedThis needs an INTO clause, where do the selected columns go?
> 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.
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!
Database questions? Check the forum:
http://www.databasedevelopmentforum.com