Обсуждение: SELECT with Function
Hello, This is my first message to pgsql-novice. I create plpgsql function "myfunc(integer)" thats returns of type record with values from table X (the function decides what record must be select). The parameter is an keyprod existing in table X and in table A. It run well sending in psql: SELECT * FROM myfunc( 10006530 ) as (vret1 numeric, vret2 numeric); The problem is: I need return data from table A (this have column 'keyprod'). This value must be passed as parameter to myfunc(). The result must be a union of columns selected from table A and result of myfunc(). How to create this query? It's possible? Thanks Paulo Nievierowski PS: Excuses my poor english.
Hi,
How can I delete empty rows in a table that I have.
f_huge_id | f_huge_name | f_huge_badge | f_huge_city
| f_huge_edu
-----------+-------------+--------------+-------------+-------------------
1 | Apparao | A12345 | Anakapalli
| Brown University
2 | Paparao | A23456 | Madugula
| Town University
3 | | |
|
4 | Chinnarao | A34456 | Uppalada
| Sink University
5 | Gangaraju | B34657 | Srikakulam
| Kulam University
6 | | |
|
7 | Appalaraju | A34457 | Chodavaram
| AMAL college
8 | Kanakarao | A56788 | Pisinikada
| Temple University
9 | | |
|
10 | | |
|
In this table columns 3,6,9 and 10 are completely
empty. I tried
=>DELETE from my_table where fc_huge_name = ' NULL';
DELTE 0
However nothing is deleted.
Is there some command or statement that I am missing.
Can any one suggest some way.
Thank you.
Kumar.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
On Wed, 29 Sep 2004, Kumar S wrote:
> How can I delete empty rows in a table that I have.
<snip>
> In this table columns 3,6,9 and 10 are completely
> empty. I tried
>
> =>DELETE from my_table where fc_huge_name = ' NULL';
DELETE FROM my_table WHERE fc_huge_name IS NULL;
will work I think.
Regards,
- --
Devrim GUNDUZ
devrim~gunduz.org devrim.gunduz~linux.org.tr
http://www.tdmsoft.com
http://www.gunduz.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQFBWulwtl86P3SPfQ4RAhx7AJ9GnQD/9zCbxKDESs3ye2OmAmCoaACaArzF
6JDwhKK4BwyMI9nSI6ez5Tk=
=zghJ
-----END PGP SIGNATURE-----