hello,
now that i finally managed to write some functions and triggers in perl,
i get the following error:
insert into journal (plus,minus,description,currency,amount) VALUES
(101,420,'a test','EUR','1.000.000');
ERROR: pg_atoi: error in "1.000.000": can't parse ".000.000"
normal since the
On Monday 27 November 2000 15:01, Nelio Alves Pereira Filho wrote:
I have the folowing procedure in PL/pgsql:
CREATE FUNCTION set_counter () RETURNS INT AS '
DECLARE
nivel_rec record;
new_count integer;
I always used the syntax like:
nivel_rec nivel%ROWTYPE;
Not sure
"Rob Burne" [EMAIL PROTECTED] writes:
I am trying to perform a query that will:
1. Return all user defined attributes from a relation.
2. Also return the datatypes of each relation.
So far I can only achieve part 1 with the following:
select attname from pg_class,pg_attribute
where
Is there any way to implement a query in Postgres that would be in some way
analogues to Oracle's START WITH/CONNECT BY structure?
Unfortunately, no such statements. Instead, you should write your own
functions which can operate on your own defined table. The table
represents the edges of the
Hi,
I have a (quite) big table with ~3M rows.
Every row has a NBPOINTS (int4) and a REASON (int4)
select sum(nbpoints) from points;
it takes about 10s
select sum(nbpoints) from points group by reason
it takes about 210s
Same table structure, same data on Oracle gives respectively 8 and
Hi!
I just subscribed myself to this list and sent a message but I am not sure
that
it reached the list. So, I am asking one more time. :-)
Is there any way to implement a query in Postgres that would be in some way
analogues to Oracle's START WITH/CONNECT BY structure?
I'd very much
Sandis Jerics [EMAIL PROTECTED] writes:
As result, now all queries, written inside the php code on multiply lines,
returns the following:
ERROR: parser: parse error at or near " "
At a guess, you're having trouble with newline representations
(Unix convention is \n only, DOS/Windows
Sherwin,
I've done this before for one project. Here's what you do:
CREATE TABLE sample_heirarchy (
unique_id SERIAL CONSTRAINT PRIMARY KEY,
node_linkup INT4,
node_level INT2,
label VARCHAR(30)
datawhatever
Mr. May,
The reason you're having trouble is that the problem you've described
does not call for a union query at all. What you want is a simple GROUP
BY query:
SELECT Node_ID, Word, Count(*)
FROM NodeIndex
GROUP BY Node_ID, Word
-Josh Berkus
--
__AGLIO DATABASE
Richard,
Please correct me if I am wrong.
You want to do something like:
select $1 from captives where firstname ~ '^(R[^ \t,]*d)$';
And get as result:
lastname
Richard
Richard
Richard
Ricard
Richard
Rolland
Richard
In this case, the above query is same as:
select firstname from captives
Hi All,
I'm planning to have data in a tree structure when fetched.
e.g.
NODE1
+ --- NODE1_1
+ --- NODE1_2
|+ --- NODE1_2_1
+ --- NODE1_3
Is this possible? How?
I would really appreciate any help.
Sherwin
I am just getting started with pgsql and have read available docs I can
find.
I know I can match a row in a where clause using a regular expression.
How can I use what was regexp matched (e.g. perl $1,$2, etc...) as a column
assignment ?
I'm looking for something like this?
select ...
...
$1
OK, I before any starts on my about backups...I have one a week
old, but I want to fix this the right way! (and I want this past
week's worth of data.
What happened:
o downloaded ip and macaddr type programs written by Paul Vixie
et al., scrapped the ip stuff, and compiled the macaddr stuff.
Hi,
You can specify a default value for the create_date
column like:
create_date timestamp default 'now'
In the insert statement just ommit that field and you
will get the default, as
insert into test1 (id, name) values (1, 'xxx');
Regards,
--
Guo Bin
--- Ang Sei Heng [EMAIL
Use default now()
--
Jesus Aneiros Sosa
mailto:[EMAIL PROTECTED]
http://jagua.cfg.sld.cu/~aneiros
On Wed, 16 Aug 2000, Ang Sei Heng wrote:
Hello to all the SQL gurus...
I have this little table:
test1 (
id char(8) primary key,
name char(20),
create_date
Hello to all the SQL gurus...
I have this little table:
test1 (
id char(8) primary key,
name char(20),
create_date timestamp
);
Now, the create_date need to be updated
to date and time whenever id is being
inserted or updated.
Is there a way in SQL that I can do this
Greetings,
I am having difficulty creating a way to insert into a view which joins
multiple tables (specifically a view which joins multiple records from a
single table to a record in another table).
Please see the enclosed simple example for how I am currently inserting
(updating, etc.) on
401 - 417 of 417 matches
Mail list logo