Re: [SQL] Check a value in array

2004-05-04 Thread CoL
hi, Marco Lazzeri wrote: Il gio, 2004-04-29 alle 19:56, Rod Taylor ha scritto: On Thu, 2004-04-29 at 13:37, Marco Lazzeri wrote: Hi all. I have to check if a value is in an array. I've got a date array in a table and I would like to perform queries like: SELECT * FROM table WHERE date IN dates_arra

Re: [SQL] Use arrays or not?

2004-05-04 Thread Roelant Ossewaarde
Hi, Thanks for your fast response. But I'm afraid I stated some things unclear. > >>The data consists of XML-records, with a lot of XML-fields. I want to > >>store > >>the XML as it is, so taking the information from the XML-records and then > >>storing it in a different-from-XML-format is not a

[SQL] Database structure

2004-05-04 Thread Alain Reymond
Hello, I would like an advise on the following problem : I have a table of patients. Each patient can make different biological assessments. Each assessment is always decomposed into different laboratory tests. A laboratory test is made of a test number and two values coming from analysers. Th

[SQL] an indexing problem on postgreSQL

2004-05-04 Thread jwang
All, I have an data-driven web application with Java and PostgreSQL. We have a few tables which hold quite large amount of data. Therefore we put indexing (B-tree) on them to make query faster. In addition, we are also doing data synchronization on these tables with another microsoft FoxPro appl

[SQL] Bacula

2004-05-04 Thread cookfire
Hi Kent, Did you have a look at Bacula (www.bacula.org) or at Amanda? They store the catalog containing what they did in a relational database. Bacula now also works with Postgresql. It still needs to be optimized for speed, but it works well. It is possible to backup Linux, Solaris, BSD and Wi

[SQL] invalid input syntax for integer: ""

2004-05-04 Thread Sebastian Tewes
Hello :-)   got a little prob...   so my table   create table warengruppen ( kennung char (1),    holder int, HauptWarenGruppe int,    BezHWG varchar (50),  WarenGruppe int,

[SQL] Rank

2004-05-04 Thread Muhyiddin A.M Hayat
  Dear All,   I Have below table    id | site_name | point+---+---  1 | Site A    |    40  2 | Site B    |    90  3 | Site D    |    22  4 | Site X    |    98    Would like to calc that Rank for each site, and look like        id | site_name | point | rank+---+-

Re: [SQL] isnumeric() function?

2004-05-04 Thread CoL
hi, Yudie wrote: > What is isnumeric function in postgresql? > I'm using psql version 7.2.2 > thanks probably somebody write a function called isnumeric for you :) So it must be a user defined function. C. ---(end of broadcast)--- TIP 9: the planner

[SQL] Rank

2004-05-04 Thread Muhyiddin A.M Hayat
Dear All,   I Have below table    id | site_name | point+---+---  1 | Site A    |    40  2 | Site B    |    90  3 | Site D    |    22  4 | Site X    |    98    Would like to calc that Rank for each site, and look like        id | site_name | point | rank+---+---

[SQL] typecasting numeric(18,4) to varchar/text

2004-05-04 Thread [EMAIL PROTECTED]
hi how can i typecast a numeric(18,4) value (that i'm extracting from a table) into a a varchar (which i'll be inserting into another table) that is: create table a (a numeric(18,4)); create table b (b varchar(25)); insert into a values(12000.43); insert into b select (a.a)::varchar; the above

Re: [SQL] Rank

2004-05-04 Thread george young
On Sun, 2 May 2004 02:22:37 +0800 "Muhyiddin A.M Hayat" <[EMAIL PROTECTED]> threw this fish to the penguins: > I Have below table > > id | site_name | point > +---+--- > 1 | Site A|40 > 2 | Site B|90 > 3 | Site D|22 > 4 | Site X|98 > > Wo

Re: [SQL] start

2004-05-04 Thread Andrei Bintintan
You say that you're running Suse 8. You can also start the process with that Yast. Start Yast2 -> System -> Runlevel Editor-> and then you can select the runlevel when you want that postgre starts. I start it at runlevel 3. If you installed postgre it manually you have a little work to do, probabl

Re: [SQL] typecasting numeric(18,4) to varchar/text

2004-05-04 Thread Andrew Sullivan
On Tue, May 04, 2004 at 09:35:31AM -0400, [EMAIL PROTECTED] wrote: > create table a (a numeric(18,4)); > create table b (b varchar(25)); > insert into a values(12000.43); > insert into b select (a.a)::varchar; Which version is that? Here's my session: andrewtest=# create table a (a numeric(18,4)

Re: [SQL] Database structure

2004-05-04 Thread Andrei Bintintan
I would go for the second one. I think the size of the table is not a problem. You will have just to write the right indexes for easy joins. OBS: " For one assessment, I'll store 60 rows with only two useful integers in it" ... why? Better make a "lab_test" table where you have the tab tests and y

Re: [SQL] invalid input syntax for integer: ""

2004-05-04 Thread scott.marlowe
On Sat, 1 May 2004, Sebastian Tewes wrote: > Hello :-) > > got a little prob... > > so my table > > create table warengruppen ( kennung char (1), > holder int, > HauptWarenGruppe int, > BezHWG varchar (50), >

Re: [SQL] typecasting numeric(18,4) to varchar/text

2004-05-04 Thread Martin Knipper
Am 04.05.2004 16:37 schrieb Andrew Sullivan: > On Tue, May 04, 2004 at 09:35:31AM -0400, [EMAIL PROTECTED] wrote: > >>create table a (a numeric(18,4)); >>create table b (b varchar(25)); >>insert into a values(12000.43); >>insert into b select (a.a)::varchar; > > > Which version is that? Here's

Re: [SQL] Rank

2004-05-04 Thread Martin Knipper
Am 04.05.2004 16:11 schrieb george young: > On Sun, 2 May 2004 02:22:37 +0800 > "Muhyiddin A.M Hayat" <[EMAIL PROTECTED]> threw this fish to the penguins: > >>I Have below table >> >> id | site_name | point >>+---+--- >> 1 | Site A|40 >> 2 | Site B|90 >> 3 | Site

Re: [SQL] Database structure

2004-05-04 Thread Alain Reymond
I thank you for your answer. The more I think about it, the more I find the second option better. Just one precision. All tests are always done, so I always hae all columns filled with a result. My only trouble was about size and performance. I store only a few byte with a lot of overhead (#a

Re: [SQL] Database structure

2004-05-04 Thread Svenne Krap
I would definately say solution two. As you point out yourself, there are only for int4s (propably even int2s), that is 8 bytes each for the int4 (if I remeber corretly), which equals something in the 40-50 bytes range for the row w/o index. For 15m rows, thats not much more than 750 megabytes wi

Re: [SQL] Database structure

2004-05-04 Thread Bruno Wolff III
On Tue, May 04, 2004 at 18:10:13 +0200, Svenne Krap <[EMAIL PROTECTED]> wrote: > > In the long run, being correct is usually better than being fast (at the > point of the implementation), as new hardware easily solves bottlenecks > for problems not scaling exponentially. And it isn't even cle

Re: [SQL] Rank

2004-05-04 Thread Rob
Martin Knipper wrote: Am 04.05.2004 16:11 schrieb george young: On Sun, 2 May 2004 02:22:37 +0800 "Muhyiddin A.M Hayat" <[EMAIL PROTECTED]> threw this fish to the penguins: I Have below table id | site_name | point +---+--- 1 | Site A|40 2 | Site B|90 3 | Site D

Re: [SQL] Rank

2004-05-04 Thread Martin Knipper
Am 04.05.2004 18:47 schrieb Rob: > Martin Knipper wrote: >>Am 04.05.2004 16:11 schrieb george young: >>>On Sun, 2 May 2004 02:22:37 +0800 >>>"Muhyiddin A.M Hayat" <[EMAIL PROTECTED]> threw this fish to the penguins: >>> I Have below table id | site_name | point +---+--

Re: [SQL] returning multiple values and ref cursors

2004-05-04 Thread Dennis
Dennis writes: What are your thoughts on the best way to approach this? Break up the stored proc into ten different stored procs that return ref cursors? I guess another question here is whether I can return a row type or record type with (integer, varchar, refcursor) and then make use of the