hi everyone ,
i have converted a ms-sql store procedure into PostgreSQL function , but
my PostgreSQL function is not giving the same output as my ms-sql procedure
does, in this ms-sql store procedure putting the result of 2 queries in two
temporary tables and displaying those column values which
Hi,
> To: pgsql-sql@postgresql.org
> Subject: [SQL] Postgresql function which compares values from both
tables
>
> hi ,
> how to write a function which should read data from 2 tables having
> same number of columns and should show the common values from those
tables.
If you w
> -Original Message-
> From: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql-
> ow...@postgresql.org] On Behalf Of Richard Huxton
> Sent: Monday, March 19, 2012 4:59 PM
> To: David Johnston
> Cc: 'Rehan Saleem'; pgsql-sql@postgresql.org
> Subject: Re:
On 19/03/12 20:04, David Johnston wrote:
You would need to install the “HSTORE” extension to convert the record
into a key->value pair then perform the comparison on that.
No, you can do this just fine with a simple join.
BEGIN;
CREATE TABLE ta (id int PRIMARY KEY, d date, t text);
CREATE TAB
PM
To: pgsql-sql@postgresql.org
Subject: [SQL] Postgresql function which compares values from both tables
hi ,
how to write a function which should read data from 2 tables having same
number of columns and should show the common values from those tables.
thanks
hi ,
how to write a function which should read data from 2 tables having same number
of columns and should show the common values from those tables.
thanks
Hello
2012/1/18 Rehan Saleem
> hi
> i want to create a function in postgresql that take input for columns from
> user for example first_name , last_name, addres. and will put them into
> table , and i also want to use exception if user enters wrong data. will
> some one help me how can i create
hi
i want to create a function in postgresql that take input for columns from user
for example first_name , last_name, addres. and will put them into table , and
i also want to use exception if user enters wrong data. will some one help me
how can i create thats function , because i am new to p
hi
i want to create a function in postgresql that take input for columns from user
for example first_name , last_name, addres. and will put them into table , and
i also want to use exception if user enters wrong data. will some one help me
how can i create thats function , because i am new to p
--- Original Message -
From: "bilal ghayyad"
To:
Sent: Tuesday, September 01, 2009 3:53 AM
Subject: [SQL] PostgreSQL Function: how to know the number of the returned
results of the Query
Hi List;
I am building a function in the SQL (PostgreSQL), so I will be able to
call this
Hello
look on PERFORM and GET DIAGNOSTICS statements
http://www.postgresql.org/docs/8.2/static/plpgsql-statements.html#PLPGSQL-STATEMENTS-SQL-NORESULT
http://www.postgresql.org/docs/8.2/static/plpgsql-statements.html#PLPGSQL-STATEMENTS-DIAGNOSTICS
regards
Pavel Stehule
2009/9/1 bilal ghayyad :
Hi List;
I am building a function in the SQL (PostgreSQL), so I will be able to call
this function using a SELECT query. Inside the body of this function, I was
need to do the following but not able to know how:
I have a SELECT statement (inside the function script itself), and I need to
know
ary 22, 2008 10:01 PM
To: pgsql-sql@postgresql.org
Subject: Re: [SQL] postgresql function not accepting null values inselect
statement
On Friday 22 February 2008 01:35:47 am Bart Degryse wrote:
> Can you try this...
>
> CREATE OR REPLACE FUNCTION getfunctionaries(p_statecd integer)
> RE
ED] [mailto:
> > [EMAIL PROTECTED]
> > On Behalf Of johnf
> > Sent: Friday, February 22, 2008 10:01 PM
> > To: pgsql-sql@postgresql.org
> > Subject: Re: [SQL] postgresql function not accepting null values
> > inselect
> > statement
> >
>
http://www.postgresql.org/docs/current/static/functions-comparison.html
This document states this:
Lets assume:
A = NULL
B = 10
C = NULL
SELECT 1 WHERE A = B returns no rows
SELECT 1 WHERE A = C returns no rows (even though both A and C are NULL)
SELECT 1 WHERE A IS NOT DISTINCT FROM C returns 1
gresql.org
Subject: Re: [SQL] postgresql function not accepting null values inselect
statement
On Friday 22 February 2008 01:35:47 am Bart Degryse wrote:
> Can you try this...
>
> CREATE OR REPLACE FUNCTION getfunctionaries(p_statecd integer)
> RETURNS SETOF t_functionaries AS
>
On Friday 22 February 2008 01:35:47 am Bart Degryse wrote:
> Can you try this...
>
> CREATE OR REPLACE FUNCTION getfunctionaries(p_statecd integer)
> RETURNS SETOF t_functionaries AS
> $BODY$
> DECLARE
> rec t_functionaries%ROWTYPE;
> BEGIN
> FOR rec IN (
> SELECT f.functionaryid, f.categ
nt separately it gives values
Thanks,
Jyoti
-Original Message-
From: Richard Huxton [mailto:[EMAIL PROTECTED]
Sent: Friday, February 22, 2008 2:35 PM
To: Jyoti Seth
Cc: pgsql-sql@postgresql.org
Subject: Re: [SQL] postgresql function not accepting null values in select
statement
Jyoti Seth wrot
Jyoti Seth wrote:
Hi,
I have a the following procedure
CREATE OR REPLACE FUNCTION getfunctionaries(p_statecd integer)
SELECT f.functionaryid, f.category,f.description
FROM functionaries f
where f.statecd=p_statecd
In the functionaries table statecd is a null field.
quot;
>
> As the document suggests you may want to try this way out:
>
> WHERE f.statecd IS NOT DISTINCT FROM p_statecd
>
> This would take care of both NULL and non-NULL values.
>
> *Robins*
>
>
> -- Forwarded message --
> From: Jyoti Seth &l
@postgresql.org
Subject: Re: [SQL] postgresql function not accepting null values in select
statement
Jyoti Seth wrote:
>
> If I pass null value as the parameter of postgresql function, which is
used
> in the where clause of select statement is not functioning properly.
Either:
1. You'r
Jyoti Seth wrote:
If I pass null value as the parameter of postgresql function, which is used
in the where clause of select statement is not functioning properly.
Either:
1. You're talking about frooble(), in which case it's supposed to do that.
or
2. You'll need to tell us what function it
Hi,
If I pass null value as the parameter of postgresql function, which is used
in the where clause of select statement is not functioning properly.
I have also changed the value of transform_null_equals = on in the conf file
and restarted postgresql. But it is still giving error.
Is t
23 matches
Mail list logo