From: | Steve Crawford <scrawford(at)pinpointresearch(dot)com> |
---|---|
To: | bugbug(at)shaw(dot)ca, pgsql-novice(at)postgresql(dot)org |
Subject: | Re: Stored Procedures |
Date: | 2003-04-10 22:54:09 |
Message-ID: | 20030410225408.CEDCA103C9@polaris.pinpointresearch.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
search for "functions" and also check out "triggers" and "rules".
Cheers,
Steve
On Thursday 10 April 2003 3:38 pm, bugbug(at)shaw(dot)ca wrote:
> Hi Im new to postgre...and Im trying to make the leap from ms sql(was kinda
> new there too! )
>
> How do I implement ms sql style stored procedures in postgre ? I have ms
> sql stored procedures like the following to insert data into a db that is
> called from a web form:
>
> CREATE PROCEDURE pr_Wellogs_Insert
> @iWELL_NUM int = NULL,
> @sOWNER nvarchar(60) = NULL,
> @siWELL_LOT smallint = NULL,
> @stFrom smallint = NULL,
> @stTO smallint = NULL
>
> AS
>
> INSERT WELLOGS
> (
> [WELL_NUM],
> [OWNER],
> [WELL_LOT]
> )
> VALUES
> (
> @iWELL_NUM,
> @sOWNER,
> @siWELL_LOT
>
> if (@stFrom <> ' ')
> begin insert stratigraphy3
> (
> [well_num],
> [from],
> [to]
> )
> values
> (
> @iWELL_NUM,
> @stFrom,
> @stTO
> )
> end
> return
>
> ------
> In pgadmin I cant even find anything called stored procedures. Also...how
> do I implement @@identity in postgre ?
>
> Thanks!
> Dennis
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
From | Date | Subject | |
---|---|---|---|
Next Message | Ville Jungman | 2003-04-11 09:44:03 | Thank You for help with postgres |
Previous Message | Josh Berkus | 2003-04-10 22:49:46 | Re: Stored Procedures |