"Michael Wagner" <[EMAIL PROTECTED]> writes:
> We need to export an SQL database to Excel. Is this within your scope and =
> what might your cost be?
>
> Please respond to Dan Beach
Why not just save it to text CSV format and Excel can then easily
import it.
--
Prasanth Kumar
[EMAIL PROTECT
Make it text, then import it. You will have lots of
tables. Send the check to :)
--- Michael Wagner <[EMAIL PROTECTED]>
wrote:
> We need to export an SQL database to Excel. Is this
> within your scope and what might your cost be?
>
> Please respond to Dan Beach
>
> [EMAIL PROTECTED]
>
On Tue, 15 Aug 2000, Adam Lang wrote:
> Gotcha. Now, if I do an insert and just don't specify that field at all, it
> will, use the default value, correct? As long as I don't "touch" the field
> with anything it uses the default.
Right, as long as you don't specify the field in the column lis
We need to export an SQL database to Excel. Is this
within your scope and what might your cost be?
Please respond to Dan Beach
[EMAIL PROTECTED]
On Tue, Aug 15, 2000 at 02:52:24PM -0400, Madel, Kurt wrote:
> Hello Antoine,
>
> I thought that triggers only worked for one table at a time. In this case,
> I want the class.size incremented and checked for maxsize when I perform an
> update or insert on the module table. I was under the impr
On Tue, Aug 15, 2000 at 01:57:17PM -0400, Madel, Kurt wrote:
> Hello,
>
> I am creating a web based (using php) class registration database with three
> tables directly effected by the registration process:
[snip]
> My question is, would it be better (faster) to use rules or to use a
> transact
At 01:24 PM 8/15/2000, DalTech - CTE wrote:
Known bug in some versions.
I believe it was fixed in v7.x, though.
Cheers
- Original Message -
From: Thomas
Swan
To: DalTech - CTE ;
Thomas Swan
Cc: Pgsql-sql
Sent: Tuesday, August 15, 2000 1:43 PM
Subject: Re: [SQL] Functions with N
On Tue, Aug 15, 2000 at 03:38:09PM -0400, Madel, Kurt wrote:
> Hey Antoine,
>
> I am using 7.0.2, and I would be in your debt if you created a working
> example. Basically, the structure of the query I would like to do is as
> such (there are six modules in the module table for each quarter:
> a
[EMAIL PROTECTED] wrote:
>
> Our non-profit organization needs a skilled volunteer to create a
> searchable database of abusive cops. Any SQL-type database program is
> OK- others may be suitable also. We've already compiled the
> questions/outline around which the database inputs will be struc
Actually, you can't do too much about it in PL/PGSQL,
because IIRC there isn't a way right now to do that.
I don't remember when PL/TCL came into existance (don't
know TCL), but you'd be able to do it in that, and
you can also do it from SPI in a C function.
And finally, the obligatory upgrade
Sort of. You can give the field a default value of
nextval() which means that if you do not specify
the column in an insert, it automatically gets the default
value which should be the next value in the sequence.
Note, that not putting the column is different from inserting a
NULL into the field
First, make sure you ran vacuum analyze to update
the statistics for the table.
If a large portion of your table is going to be scanned,
Seq Scan is often faster than Index Scan due to possibly
random seeks within the heap file (the transaction commit
state isn't in the index, so there is still
At 10:12 AM 8/15/2000, DalTech - CTE wrote:
I would try using
COALESCE(list) which will return the
first non-NULL in the list.
That worked! Thanks!
The second part is why does postgresql not evaluate the function if one
of the arguments is null?
Well, if you define your main table to have a serial, or an explicit
default nextval(seqid), you won't even need to do that. Just leave
the column off the insert list and the default should fill it for you.
Stephan Szabo
[EMAIL PROTECTED]
On Tue, 15 Aug 2000, Adam Lang wrote:
> I get it. I up
Create a trigger on module before update or insert. The philosophy of
postgres is to create a trigger based on a function previously created.
Take a look at the docs, the part on procedural languages. The book
from Momjian has one or two examples on triggers creation.
--
Jesus Aneiros Sosa
mailt
Hey,
Is there a way to access the properties of a field through an SQL statement?
i.e. wether field is a foreign key or if it is primary or varchar etc.
I am connecting to the database through PERL/DBI and need to access the
properties of the fields to build the web page around.
Thanks
Scott
Hey Antoine,
That is awesome, you just whipped that out, and I think it will work
beautifully. I will let you know.
Also, I think I have the last one licked
- The trigger on INSERT on modules should return an error if the class_id
does not exist..
I created the 'module.class_id' as a foreign k
To escape % use \\% as in '50\\%', to escape ' use '' as in 'o''conell',
retrieves o'conell
Regards.
--
Jesus Aneiros Sosa
mailto:[EMAIL PROTECTED]
http://jagua.cfg.sld.cu/~aneiros
On Tue, 15 Aug 2000, Jie Liang wrote:
> Hi,there,
>
> Is anybody know how I can escape % or ' (my column contai
I think you could use a function like the one below and use the following
select:
select id, name1, name2, prefname(foo) as pref from foo;
create function prefname(foo)
returns text as'
declare
foo alias for $1;
begin
if foo.name2 is null
then
return foo.na
Hey Antoine,
I am using 7.0.2, and I would be in your debt if you created a working
example. Basically, the structure of the query I would like to do is as
such (there are six modules in the module table for each quarter:
a_q1,b_q1,c_q1,d_q1,e_q1,morn_q1,a_q2.). A student comes to register
Hi,there,
Is anybody know how I can escape % or ' (my column contains % or ' )
in my text field.
select mystring from textbook where mystring like .
--
Jie LIANG
Internet Products Inc.
10350 Science Center Drive
Suite 100, San Diego, CA 92121
Office:(858)320-4873
[EMAIL PROTECTED]
www.
Hello Antoine,
I thought that triggers only worked for one table at a time. In this case,
I want the class.size incremented and checked for maxsize when I perform an
update or insert on the module table. I was under the impression that a
trigger would only work if I was performing an insert or
Gotcha. Now, if I do an insert and just don't specify that field at all, it
will, use the default value, correct? As long as I don't "touch" the field
with anything it uses the default.
Adam Lang
Systems Engineer
Rutgers Casualty Insurance Company
- Original Message -
From: "Stephan Szab
I've just split the text up (in 8 pieces), so it fits into 8K rows. But thats
only a viable solution if your text is less than a couple of 100K's.
You could try to be a daredevil and use the Toast code, even if it's beta. But
I don't know how far the Toast project has come.
Keith Wong wrote:
>
Hello,
I am creating a web based (using php) class registration database with three
tables directly effected by the registration process:
1) class
2) student
3) module
The module table has a field for every module (or class period) for every
student that registers for a given year. When a stud
RedHat 6.2 /Postgres 6.53
I'm still very new at PL/PGSQL but I have looked thru all the
documentation I could find before sending this in.
I have a function that I would like to be able to apply to multiple
tables without having to duplicate the code. I would like to be able
to pass in the ta
Hi,
Is anybody know how to declare a explicit cursor in PL/pgSQL (not in
SQL) ???
syntax:
declare
cursor mycur is select statement ?? it won't work!
--
Jie LIANG
Internet Products Inc.
10350 Science Center Drive
Suite 100, San Diego, CA 92121
Office:(858)320-4873
[EMAIL PROTECTED]
www.ipinc.c
Hmmm... well, I don't think I have an "explicit" nextval. I created the
table and then I did a create sequence broker_id;
Are you implying that I can set the field to automatically create a nextval?
Adam Lang
Systems Engineer
Rutgers Casualty Insurance Company
- Original Message -
From:
I believe you are correct. Version 7.1 will supposedly eliminate the row
size.
Adam Lang
Systems Engineer
Rutgers Casualty Insurance Company
- Original Message -
From: "Thomas Swan" <[EMAIL PROTECTED]>
To: "Keith Wong" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, August 15, 20
At 06:29 AM 8/15/2000, Keith Wong wrote:
Hi everyone,
Just wondering what strategies people have used to get around the 8K row
limit in Postgres.
If anyone has been troubled by this limitation before and has a nice
solution around it, I would love to hear it.
My application is a web-based system
Hi. I am attempting to create a function to do some selects and return
some information. Pretty straight forward. No matter what I do, I always
get this error. Here is my stored function and how I am calling it...
create function sp_list_categories(int4) returns varchar as '
DECLARE
p
Hello Jesus,
Tuesday, August 15, 2000, 4:04:40 PM, you wrote:
JA> The solution is called referential integrity. you should use the foreign
JA> key and references clause with cascade.
>> can someone suggest some good online resource where such common sql topics
>> discussed?
JA> I would like to
Hi,
thanks, that works ok.
But has anybody some suggestions how this
behaves performance wise, if I have like 10 language dependent fields
and translation t1 till translation t10.
Volker
Renato De Giovanni wrote:
>
> Maybe something like this:
>
> CREATE VIEW locale_customer2 AS
> SELECT cust
On Tue, 15 Aug 2000, Sandis wrote:
> there is a db with a few tables that have related (joined) fields. if
> record in a one table (auxiliary) gets deleted (along with it's
I would say this is the primary table.
> primary key), reference to it in another table (main) points to
And this is the
Hello pgsql-sql,
sorry for my question that is obviously a kind of lame and not
related directly to postges, but i
never dealt with it before & need an idea what to do right now.
there is a db with a few tables that have related (joined) fields.
if record in a one table (auxiliary) gets deleted
I get it. I upload to the temp table, then for the select/insert I just do
the nextval(seq_id) for the primary key field, correct?
Adam Lang
Systems Engineer
Rutgers Casualty Insurance Company
- Original Message -
From: "Stephan Szabo" <[EMAIL PROTECTED]>
To: "Adam Lang" <[EMAIL PROTECTE
I would try using COALESCE(list) which will return the
first non-NULL in the list.
- Original Message -
From:
Thomas Swan
To: [EMAIL PROTECTED]
Sent: Tuesday, August 15, 2000 3:18
AM
Subject: [SQL] Functions with Null
Arguments?
Is there anyway way to get the
First sorry for the late reply, I only get this
list from home, and just got email working again.
I was working on ARRAY and STRUCT for 7.0, but it a
snag. I couldn't get a grips with what the spec meant, and couldn't work out how
the SQL3 ARRAY type relates to our arrays. From the document
Hi everyone,
Just wondering what strategies people have used to get around the 8K row
limit in Postgres.
If anyone has been troubled by this limitation before and has a nice
solution around it, I would love to hear it.
My application is a web-based system in which needs to store large amounts
Hi,
I want the content of a field to be language dependent.
Therfore we have a Translation table which looks like this:
tln_id tln_lng_id tln_text
-
1 de hallo
1 en hello
2 de Herr
2 en
Hi *,
I have pgsql7.0.2 on Linux2.2.16 and table with following indices:
CREATE TABLE T1 (NUM INT NOT NULL, NAME VARCHAR(10) NOT NULL, POP
VARCHAR(10) NOT NULL);
CREATE INDEX T1_I_NUM ON T1(NUM);
CREATE INDEX T1_I_NAME ON T1(NAME);
CREATE INDEX T1_I_POP ON T1(POP);
... and some data, but I real
41 matches
Mail list logo