[SQL] help

2001-04-07 Thread Loïc Bourgeois
I read your document about the porting from Oracle to PgSql and I would like to know if you can say to me if there is an equivalent on an the option NOWAIT for a request SELECT ... FOR UPDATE (for Oracle) under PgSql. This option don't wait a previus unlock and return the information like the

[SQL] Help

2002-09-10 Thread Bc . Šimko Juraj
Hallo ! I have problem find out distribution of PostgreSQL for windows. Can you help me, or send me some url links, where I will find it. Thanks. Juraj S, --- Bc. Šimko Juraj Juraja Kréna 6 915 01 Nové Mesto nad Váh

[SQL] help!

2002-10-18 Thread John Geng
how to migrate sql from MS sql server to postgresql? i'd like to tranfer sql schema from MS serverExample:***1*if exists (select * from sysobjects where id = object_id(N'[admin].[test]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)drop table [adm

[SQL] help

2003-01-21 Thread Rudi Starcevic
help ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org

[SQL] help

2003-06-12 Thread Tony Simbine
hello, I've a query which needs too many time ca. 12-15 sec. how can i get a better perfomance? my table have less than 2300 rows. thanks in advance tony explain select o.id from ioobeject o,dist_vertron v where macro_lid=1123 and (o.id=v.id) and (o.deleted<>'1') and (o.status='acti

[SQL] help

2003-09-29 Thread shengqj
Hi, there       I'm attempting to install PostgreSQL-7.3.3 under Windows 2000 professional.    -cygwin-1.5.5-1    -cygipc-2.01-2      but i got trouble when performing  initdb command, all the interactive information listed as follows,   --

[SQL] help

2010-05-07 Thread Nicholas I
Hi, I have a table in which the data's are entered like, Example: One (1) Two (2) Three (3) I want to extract the data which is only within the parentheses. that is 1 2 3 Thank You Nicholas I

[SQL] help

2001-03-12 Thread chard
help me pls. i got an error like this when i do an insert to a table, my table dont have bpchar type of field. ERROR: Unable to identify an operator '=' for types 'bpchar' and 'varchar' You will have to retype this query using an explicit cast ---(end of broad

[SQL] help

2001-03-12 Thread chard
help me pls. i got an error like this when i do an insert to a table, my table dont have bpchar type of field. ERROR: Unable to identify an operator '=' for types 'bpchar' and 'varchar' You will have to retype this query using an explicit cast it seems 1 field in my table has bpchar t

[SQL] Help

2001-03-25 Thread Mohamed ebrahim
Hi, I am a user of postgresql. I want to know that it is possible to call a jsp file in postgre command.Please help me to know how to call a jsp file. Thank you Ebrahim __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://

[SQL] Help

2001-03-25 Thread Mohamed ebrahim
Hi, I am a user postgresql. I want to update a table automatically when we reach monthend. i.e i want to update some table on 31 of every month automatically without any user attention. I want to know how to do this. If anyone knows how to do this please mail me. i will be ever thankfull to h

[SQL] Help

2001-03-26 Thread Mohamed ebrahim
Hi, Thanks for your valuable information. I tried the cron. i typed cron -e and entereed into the input area. but i don't know how to save the cron file. I pressed ctrl+z and came out from cron. but i edit the cron file i found nothing on it.(i.e using pico filename.) Please tell me some de

[SQL] Help needed

2005-11-30 Thread NosyMan
Hi everyone, I have some kind of strange problem. I want to build general parametrized trigger for my database. The parameter sent to the trigger contains a column name that trigger should be check. CREATE OR REPLACE FUNCTION F_T_IU__check() RETURNS trigger AS $$ DECLARE

[SQL] Help datetime

2001-06-12 Thread Tubagus Nizomi
i have problem in datetime my_table (start_date datetime,stop_date datetime); insert into my_table values ('Sun May 13 16:19:27 2001 JAVT','Sun May 13 14:06:13 2001 JAVT') select stop_date-start_date from my_table the result is "@ 2 hours 13 mins 14 secs" but i want result in minutes(integer) n

[SQL] Help needed

2002-08-28 Thread Mowat, Paul
Dear postgresql, I am just starting to learn SQL. I have attached a script that allows me to create some tables and indexes. I have rows that are inserted into the tables.   I need some help with creating multiple subqueries and table joins, (six or seven table joins). Can you help? Paul Mo

Re: [SQL] help!

2002-10-24 Thread Horst Herb
On Wed, 16 Oct 2002 19:15, John Geng wrote: > how to migrate sql from MS sql server to postgresql? > i'd like to tranfer sql schema from MS server > Example: > ***1* > if exists (select * from sysobjects > where id = object_id(N'[admin].[test]') and >

[SQL] help: triggers

2003-01-29 Thread Tony Simbine
hello, I'm trying to update a columm on a table with a trigger but it don't work on PostgreSQL 7.2 (i686-pc-linux-gnu, compiled by GCC 2.96). when I update a row the trigger does nothing. what can I do? thanks in advance tony here is my trigger: #

[SQL] SQL Help

2003-05-31 Thread C F
Hello, I already tried this same basic question with no response  maybe I was too wordy.  So here it is simplified what's the best way to write this query?  I'm open to using stored procedures, but even then I don't know how I would conditionally populate a resultset (refcursor).  Notice th

Re: [SQL] help

2003-06-12 Thread Josh Berkus
Tony, > I've a query which needs too many time ca. 12-15 sec. > how can i get a better perfomance? First of all, please take this to the PGSQL-PERFORMANCE list. Second, see this web page: http://techdocs.postgresql.org/guides/SlowQueryPostingGuidelines > explain select o.id from ioobeject o,dis

Re: [SQL] help

2003-06-17 Thread Tony Simbine
Josh, thanks for your help. Josh Berkus wrote: Tony, I've a query which needs too many time ca. 12-15 sec. how can i get a better perfomance? First of all, please take this to the PGSQL-PERFORMANCE list. Second, see this web page: http://techdocs.postgresql.org/guides/SlowQueryPostingGuideli

[SQL] Help Me

2003-07-19 Thread Ramesh Kumar B
How to convert charter varying type to integer while retrieving the value using ITL tag [query]?! ___ Click below to experience Sooraj R Barjatya's latest offering 'Main Prem Ki Diwani Hoon' starring Hrithik, Abhishek & Kareena http://www.mpkdh.com

[SQL] Help me

2003-09-04 Thread Yaroslav Ulyanov
Hello   I cannot write new function with local variables (see image in attachment).   That I do wrong?     Best regards,Yaroslav Ulyanov[EMAIL PROTECTED] <> ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http

[SQL] HELP ME

2003-10-14 Thread jagan reddy
Where can i find a tutorial on PL/PGSQL?.Help me by listing some sites to guide me in this context. Thanks. __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com ---(end of broadcast)

[SQL] help me...

2003-11-09 Thread ron_tabada
Hello everyone, Good day! Could anyone help me translate this query in Microsoft Access to Postgresql. I'm having a difficulty. Pls... Query1:SELECT items.description, Sum(supplieditems.qty) AS SumOfqtyFROM items INNER JOIN supplieditems ON items.itemno = supplieditems.itemnoGROUP BY items.descript

[SQL] SQL Help

2003-11-09 Thread luisblock
PLS, help, I am trying to JOIN two tables together with the LEFT OUTER JOIN statement, but with a twist: 1. table 1 id and table 2 projectid are the join field 2. Table 1 has de detail info for several ocurrences in table 2. For each id in table 1 (project detail), there are many entries of pr

Re: [SQL] help

2010-05-07 Thread Filip Rembiałkowski
select substring( data from '\((.*)\)' ) from table; 2010/5/5 Nicholas I : > Hi, > > I have a table in which the data's are entered like, > > Example: > > One (1) > Two (2) > Three (3) > > I want to extract the data which is only within the parentheses. > > that is > 1 > 2 > 3 > > > Thank You > N

Re: [SQL] help

2010-06-27 Thread Marcin Krawczyk
Or even simpler, or easier to understand: SELECT trim(foo, '()') FROM foobar pozdrowienia / regards / salutations mk 2010/5/5 Nicholas I > Hi, > > I have a table in which the data's are entered like, > > Example: > > One (1) > Two (2) > Three (3) > > I want to extract the data which is only

[SQL] HELP! ... pg_locale ???

2000-10-26 Thread Sandis Jerics
Hello folks, I got a headache now, cause our admin played with postgres settings, something about pg_locale, as he says. Perhaps the reason is elsewhere, i dont know. As result, now all queries, written inside the php code on multiply lines, returns the following: ERROR: parser: parse error at

[SQL] SQL Help

2001-01-26 Thread Mark A. Summers
I am having trouble with the following query taking forever: - SELECT * FROM ret108108_00, product WHERE ret108108_00."isbn" = product."Item1" AND product."SuperCategory" = '1' AND product."PublisherCode" = 'ZON' ORDER BY ret108108_00.qty DESC LIMIT 100 The problem is the second AND

Re: [SQL] help

2001-03-12 Thread Stephan Szabo
What is the schema of the table in question, does it have any references to other tables and what is an example insert statement? On Wed, 7 Mar 2001, chard wrote: > > help me pls. > i got an error like this when i do an insert to a table, my table dont > have bpchar type of field. > > ERROR:

Re: [SQL] help

2001-03-12 Thread Tom Lane
chard <[EMAIL PROTECTED]> writes: > i got an error like this when i do an insert to a table, my table dont > have bpchar type of field. > ERROR: Unable to identify an operator '=' for types 'bpchar' and 'varchar' > You will have to retype this query using an explicit cast > it seems 1 fie

Re: [SQL] Help

2001-03-25 Thread Roberto Mello
On Sat, Mar 24, 2001 at 10:50:31PM -0800, Mohamed ebrahim wrote: > Hi, > > I am a user of postgresql. I want to know that it > is possible to call a jsp file in postgre > command.Please help me to know how to call a jsp file. You need a Servlet container to process jsp files and Post

Re: [SQL] Help

2001-03-25 Thread Brett W. McCoy
On Sat, 24 Mar 2001, Mohamed ebrahim wrote: > I am a user of postgresql. I want to know that it > is possible to call a jsp file in postgre > command.Please help me to know how to call a jsp file. What do you mean 'call a JSP file'? A JSP file is parsed and compiled by something like Jasper

Re: [SQL] Help

2001-03-25 Thread Peter Eisentraut
Mohamed ebrahim writes: > I am a user postgresql. I want to update a table > automatically when we reach monthend. i.e i want to > update some table on 31 of every month automatically > without any user attention. Use a cron job. -- Peter Eisentraut [EMAIL PROTECTED] http://yi.o

Re: [SQL] Help

2001-03-25 Thread Joe Conway
> I am a user postgresql. I want to update a table > automatically when we reach monthend. i.e i want to > update some table on 31 of every month automatically > without any user attention. I want to know how to do > this. If anyone knows how to do this please mail me. i > will be ever thankfu

Re: [SQL] Help

2001-03-25 Thread Richard Huxton
From: "Mohamed ebrahim" <[EMAIL PROTECTED]> > Hi, > > I am a user postgresql. I want to update a table > automatically when we reach monthend. i.e i want to > update some table on 31 of every month automatically > without any user attention. I want to know how to do > this. If anyone knows ho

Re: [SQL] Help

2001-03-26 Thread Joe Conway
> Thanks for your valuable information. I tried the > cron. i typed >cron -e > and entereed into the input area. but i don't know how > to save the cron file. I pressed ctrl+z and came out > from cron. but i edit the cron file i found nothing on > it.(i.e using pico filename.) Please tell me

Re: [SQL] Help

2001-03-26 Thread selkovjr
> Instead of "ctrl+z", press ":wq" (colon for command mode, w for write, q for > quit). If you are still mystified, "ctrl+z" stops a process running on a terminal, so it's likely that your vi is still running idle. Type 'fg' on the same terminal to bring it back. For more details on job control,

Re: [SQL] Help

2001-03-26 Thread Cedar Cox
> > Thanks for your valuable information. I tried the > > cron. i typed > >cron -e > > and entereed into the input area. but i don't know how > > to save the cron file. I pressed ctrl+z and came out > > from cron. but i edit the cron file i found nothing on > > it.(i.e using pico filename.)

Re: [SQL] HELP ME

2003-11-18 Thread Randolf Richardson, DevNet SysOp 29
> Where can i find a tutorial on PL/PGSQL?.Help me by > listing some sites to guide me in this context. Does the following meet your needs? Chapter 19. PL/pgSQL - SQL Procedural Language http://www.sql.org/sql-database/postgresql/manual/plpgsql.html -- Ra

[SQL] Help on triggers

2004-08-01 Thread Pradeepkumar, Pyatalo (IE10)
Hi all, I have 2 tables - table1 and table2. Both the tables are related to each other. I have written triggers so that if a tuple is inserted into table1, corresponding values will be inserted into table2. and if a tuple is deleted from table1 then corresponding tuples are deleted from table2 al

[SQL] Help with function

2004-09-20 Thread CHRIS HOOVER
I need some help writing a simple function. Due to some program limitations for a program I run the db's for, I'm having to write some simple functions to run some selects. However, I am not sure how to have them correctly return the record(s) selected and/or how to properly call them from sql.

Re: [SQL] Help needed

2005-11-30 Thread Richard Huxton
NosyMan wrote: Hi everyone, I have some kind of strange problem. I want to build general parametrized trigger for my database. The parameter sent to the trigger contains a column name that trigger should be check. The 'vt' variable contains the column name. In the above statement I want th

[SQL] Help! Record logging

2001-05-18 Thread Edwin S. Ramirez
Hello, I would like to setup a trigger to keep track of all changes done onto the records of paticular tables. Basically, there would be two identical tables such as, 'medications' and 'medications_log', when a user inserts, updates or deletes a record I would like a copy to be inserted into

[SQL] HELP: Trend reporting

2001-08-30 Thread Jason Charette
Hello newsgroup buddies, I am looking for information on trend reporting. We run Linux, PostreSQL, Apache and PHP4. We have a series of scripts that track customer usage through our sites, and give us similar information to what is found in the Apache logs, but with more data. I now find myself

[SQL] Help On Postgresql

2001-08-30 Thread Jaydip
Dear Friends   I am Jaydip Dewanji working as a Sr. Programmer for Ontrack Systems Ltd.   I have some questions regarding Postgresql which are listed below:   a) How do I retrieve the Year,Month,Day,Hr,Minute or Second value from a Date/DateTime variable.       For Example : i> In Oracle to_

[SQL] Help tuning query

2002-09-27 Thread Kevin Traub
All; Can anyone please help with the tuning of this query? With 77000 rows in the operator_messages database the query is taking almost 15 seconds to return. Preference woul dbe under 5 seconds if possible. System load on a dual processor P3 with 1.5GB of memory remains under .4 during the query

[SQL] Help with SQL

2002-10-16 Thread Eric L. Blevins
I'm new to postgres. I've got 2 SQL statements I would like to combine into one.   I think I need to use a sub select or join I am not sure. Any help would be appreciated!   statement 1: SELECT  uid, count(uid)  FROM triangulated WHERE uid != 'anonymus' AND uid!= 'anonymous' AND uid != '' GRO

[SQL] help optimise this ?

2002-11-21 Thread Peter Galbavy
I have a table of image 'instances' where the columns include: md5 char(32),-- the 'original' image md5 key file_md5 char(32) primary key, -- the md5 of each version of an image image_width int, image_length int I want to then find either the largest (max) or smallest (min)

Re: [SQL] help: triggers

2003-01-29 Thread Wei Weng
It would be better if you could provide the source of that trigger and involved table schemas? Wei - Original Message - From: "Tony Simbine" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 29, 2003 8:29 AM Subject: [SQL] help: triggers >

Re: [SQL] help: triggers

2003-01-30 Thread Tony Simbine
empo" integer DEFAULT 0 NOT NULL, "deleted" character(1) DEFAULT '0', Constraint "pk_iobjects" Primary Key ("id") ); GRANT ALL on "iobjects" to "jantos"; Wei - Original Message - From: "Tony Simbine&q

[SQL] Help with LIKE

2003-03-20 Thread David Olbersen
I have a table with 8,628,633 rows that I'd LIKE to search (ha ha). I have a very simple query: SELECT * FROM tableA WHERE column1 LIKE '%something%'; tableA.column1 has an index on it and the database has been vacuumed recently. My problem is with the output of EXPLAIN: +

Re: [SQL] SQL Help

2003-05-31 Thread Bruno Wolff III
On Fri, May 30, 2003 at 08:47:03 -0700, C F <[EMAIL PROTECTED]> wrote: > Hello, > I already tried this same basic question with no response maybe I was too > wordy. So here it is simplified what's the best way to write this query? I'm > open to using stored procedures, but even then

Re: [SQL] SQL Help

2003-05-31 Thread Josh Berkus
CF, > select > (case when column1 = column2 then column3 end) as alias1, > (case when column1 = column2 then column4 end) as alias2, > (case when column1 = column2 then column5 end) as alias3, > (case when column6 = column7 then column8 end) as alias4 > from > mytable Given the informat

Re: [SQL] SQL Help

2003-05-31 Thread Franco Bruno Borghesi
If your concern is speed, the thing here is that you will have as many records as there are in "mytable", most of them (I think) with NULLs for alias1, alias2, alias3 and alias4. This way, there is no condition to filter any record, so postgreSQL will do a sequential scan over the whole table. If

Re: [SQL] Help me

2003-09-04 Thread George Weaver
Hi Yaroslav,   You must set the language as:     LANGUAGE 'plpgsql';   Regards, George - Original Message - From: Yaroslav Ulyanov To: [EMAIL PROTECTED] Sent: Thursday, September 04, 2003 2:46 AM Subject: [SQL] Help me Hello   I cannot

Re: [SQL] Help me

2003-09-05 Thread Yaroslav Ulyanov
Very thanks, George! - Original Message - From: George Weaver To: Yaroslav Ulyanov ; [EMAIL PROTECTED] Sent: Friday, September 05, 2003 12:48 AM Subject: Re: [SQL] Help me Hi Yaroslav,   You must set the language as:     LANGUAGE 'pl

Re: [SQL] help me...

2003-11-09 Thread Yasir Malik
859-1] ron_tabada wrote: > Date: Sat, 8 Nov 2003 06:02:15 + (GMT) > From: "[iso-8859-1] ron_tabada" <[EMAIL PROTECTED]> > Reply-To: [EMAIL PROTECTED] > To: [EMAIL PROTECTED] > Subject: [SQL] help me... > > Hello everyone, Good day! Could anyone help me translate th

Re: [SQL] help me...

2003-11-09 Thread Christopher Browne
The world rejoiced as [EMAIL PROTECTED] (ron_tabada) wrote: > Hello everyone, Good day! Could anyone help me translate this query > in Microsoft Access to Postgresql. I'm having a difficulty. Pls... > > Query1: > SELECT items.description, Sum(supplieditems.qty) AS SumOfqty > FROM items INNER JOIN s

Re: [SQL] help me...

2003-11-10 Thread Yasir Malik
That's what I said! :) Yasir On Sun, 9 Nov 2003, Christopher Browne wrote: > Date: Sun, 09 Nov 2003 21:59:14 -0500 > From: Christopher Browne <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Subject: Re: [SQL] help me... > > The world rejoiced as [EMAIL PROTECTED]

Re: [SQL] help me...

2003-11-10 Thread Yasir Malik
t, 8 Nov 2003 06:02:15 + (GMT) > From: "[iso-8859-1] ron_tabada" <[EMAIL PROTECTED]> > Reply-To: [EMAIL PROTECTED] > To: [EMAIL PROTECTED] > Subject: [SQL] help me... > > Hello everyone, Good day! Could anyone help me translate this query in Microsoft > Acces

[SQL] help with function

2006-03-16 Thread lacou
Hello, I have 2 tables where each table has a column named "comments" and the tables are related as a one to many. I want to concatenate all the comments of the many side to the one side so I wrote the following plpgsql function to do so. CREATE OR REPLACE FUNCTION fixcomments() RETURNS

[SQL] help with pagila

2006-09-01 Thread Walter Cruz
Hi all. I'm with a little doubt.I'm testing the pagila (the postgres port of mysql sakila sample).Well, I was trying to translate the query:select film.film_id AS FID, film.title AS title, film.description AS description, category.name AS category, film.rental_rate AS price,

[SQL] Help with Array

2007-01-08 Thread Jeremiah Elliott
I have a java application that moves data from our erp platform (progress) into a Postgres database. One of the fields in progress is a character array. I haven't had any luck getting this field to transfer. What I would like to do is something like: preparedStatement.setArray(i,resultSet.ge

[SQL] help-simplify query

2009-10-17 Thread Muhammad Rafizeldi
Dear All I need to simplify this query, It takes a lot of time to execute Since "skala_rental" table has 2.3million rows(Table Size:387 MB, Indexes Size: 132MB) and scanned 6 times in the execution. cf_application_id has +10rows, Table Size: 21 MB, Indexes Size: 18MB I guest the problem is on t

[SQL] Help with reg_exp

2010-03-25 Thread John Gage
[I mistakenly used the wrong Subject line initially with this post] In going through the arcana of string functions, I have come across the following series of selects that contain, for me, a mysterious "$re$". -- return all matches from regexp SELECT regexp_matches(' foobarbequebaz', $re$(bar)(b

Fw: Re: [SQL] help

2010-05-27 Thread James Kitambara
--- On Thu, 27/5/10, James Kitambara wrote: From: James Kitambara Subject: Re: [SQL] help To: "Nicholas I" Date: Thursday, 27 May, 2010, 14:50 Hello Mr. Nicholas,   You can try the following:   THIS IS WHAT I TRIED TO SOLVE YOUR PROBLEM, BUT IN ORACLE DBMS (SORRY I

[SQL] Help with queries.

2010-09-21 Thread Adrian Johnson
Dear group, I just started learning postgres and I have to analyze my data. So please bear with me, for all the simple questions that I am asking. Apologies. I have a table: snps table id | sample_id | chromosome | from | to | -

[SQL] help on select

2011-04-20 Thread Saulo Venâncio
Hi guys, I need your help. I have a table called medidas, in this table i have some ocurrences that has id_medida(primary key) id_ponto (sec_key) and also datetime field as timestamp. i would like to know from a set of idpontos, e.g. 10,11,23,24 how can i get the most recent date that is common

[SQL] postgres sql help

2011-10-16 Thread James Bond
hi, i am fairly new in postgresql, so if anyone can help me would be great if i simply do: select ver_no from version order by ver_no the result will be something like this: .1.3.1 .1.3.2.5. .1.4.1.7.12 .1.4.11.14.7. .1.4.3.109.1. .1.4.8.66. so as you can see first 3 lines ar

Re: [SQL] HELP! ... pg_locale ???

2000-10-27 Thread Tom Lane
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 conv

Re: [SQL] HELP! ... pg_locale ???

2000-10-28 Thread Tom Lane
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 conv

[SQL] help with query

2001-01-24 Thread Oleg Bartunov
Hi, I have a table messages which has (for simplicity) two columns - msg_id, last_id, where last_id is sort of symbolical link - it points to the msg_id of the last version of message. There are no limitation to the number of versions. The problem I have is to get history of message with given

Re: [SQL] SQL Help

2001-01-26 Thread Stephan Szabo
On Fri, 26 Jan 2001, Mark A. Summers wrote: > I am having trouble with the following query taking forever: > - > SELECT * FROM ret108108_00, product > WHERE ret108108_00."isbn" = product."Item1" > > AND product."SuperCategory" = '1' > AND product."PublisherCode" = 'ZON' > ORDER BY ret10

Re: [SQL] SQL Help

2001-01-29 Thread Mark A. Summers
I am loser -- I didn't realize there was analyze option on vacuum -- I created another index on Publisher code -- Now it smokes thanks Mark Summers "Stephan Szabo" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > On Fri, 26 Jan 2001, Mark A. Summers wrote: >

[SQL] Help! Error with postgresql!

2004-02-01 Thread raingsey
Hello, I have problem when i execute the .sql file in my psql command prompt. The error code is below: pylori=# \i log-clinique.sql CREATE psql:log-clinique.sql:100: ERROR:  parser: parse error at or near ".3" psql:log-clinique.sql:107: ERROR:  parser: parse error at or near ".3" psql:log-cliniqu

[SQL] Help with COPY command

2004-04-09 Thread Tony Reina
I'm attempting to use the COPY command through the libpq C functions. In the psql command line editor, I'd have the following commands: COPY testtable FROM stdin WITH DELIMITER ','; 1, 2, 'a', 3, 4 5, 6, 'b', 7, 8 9, 10, 'c', 11, 12 \. My question is: Does this all have to be passed as one big

[SQL] help with Postgres function

2004-06-20 Thread ctrl
Hello. I'd appreciate any help with a function I'm writing. I have a simple table like this: CREATE TABLE websites ( id BIGSERIAL not null primary key, domain character varying(256) NOT NULL, last_fetch timestamp without time zone DEFAULT 'now()', crawl_status smallint not null DEFAULT 1 ); and m

Re: [SQL] help with trigger

2004-08-27 Thread Dino Vliet
Maybe I've missed it but can someone plese help me with this? Brgds and thanks in advance, --- Dino Vliet <[EMAIL PROTECTED]> wrote: > Hi folks, > I'm new to PostgreSQL and am busy tring to work with > it. Of pl/pgsql I know even less and that's the part > I > have a question on right now. I hav

Re: [SQL] Help with function

2004-09-20 Thread Stephan Szabo
On Mon, 20 Sep 2004, CHRIS HOOVER wrote: > I need some help writing a simple function. > > Due to some program limitations for a program I run the db's for, I'm having > to write some simple functions to run some selects. However, I am not sure > how to have them correctly return the record(s) se

Re: [SQL] Help with function

2004-09-21 Thread CHRIS HOOVER
" for Table_Rec in SQLStr loop return next Table_rec; end loop; return; end; Is this possible? Thanks again for any help, Chris --( Forwarded letter 1 follows )- Date: Mon, 20 Sep 2004 13:51:09 -0700 (PDT) To: chris.hoover Cc: [EMAIL PROTECTED] From: [

Re: [SQL] Help with function

2004-09-21 Thread Stephan Szabo
On Tue, 21 Sep 2004, CHRIS HOOVER wrote: > Thanks a bunch for the pointers and help. > > One other hopefully quick question. > > How do you query using a variable containing the query? > > I'm trying to build a select statment based upon what parameters are being > passed to the function. > > somt

[SQL] help on a query

2004-10-07 Thread Michelle Murrain
Hi all, This is one of those things I know I should know, but it's not coming to me. It's probably really simple. I have two related tables, registrations and receipts, related by the field registration_id. So registrations looks kinda like: registration_id bigint (primary key) foo varchar(10)

[SQL] Help in stored procedure

2004-11-05 Thread Igor Maciel Macaubas
Hi Guys,   I need some help on building the following stored procedure, in PL/PgSQL. If this is not the right place to ask for help in this language, please let me know. Here is what I want to do, my comments in red:   CREATE OR REPLACE FUNCTION discover_nsu(integer) RETURNS integer as 'DECL

[SQL] Help to drop table

2005-04-22 Thread Igor Kryltsov
Please help to drop table with soace inside name. List of relations Schema | Name | Type | Owner +--+---+-- public | Facility Info| table | postgres > DROP TABLE ?? Thank you,

[SQL] Help with views/rules...

2005-05-18 Thread Peter Bense
I've got this funky problem. Basically I have a table that contains: afl=# \d tblpis_survey_receipt Table "public.tblpis_survey_receipt" Column | Type | Modifiers +---

[SQL] Help with query, stuck :(

2005-06-27 Thread bumby
I have a table as Table "public.timereport" Column |Type | Modifiers --+-+ id | integer

[SQL] Help With complex join

2005-07-14 Thread spinto
Hi all, got a question as how to approach a somewhat complicated join query. The deal is I have three tables called attorney, lawOffice, and law_office_employment. The attorney and lawOffice tables hold attorney and lawOffice information respectively (obviously). The law_office_employment table

[SQL] Help with UNION query

2005-09-04 Thread Andreas Joseph Krogh
Hi all, I have the followin query: SELECT g.id from onp_group g where g.groupname IN (SELECT ug.groupname from onp_user_group ug WHERE ug.username = 'andreak') UNION (SELECT child_id FROM onp_group_children WHERE group_id IN (SELECT g.id from onp_group g

[SQL] Help with multistage query

2005-09-07 Thread Rick Schumeyer
I have a perl script that issues a series of SQL statements to perform some queries.  The script works, but I believe there must be a more elegant way to do this.   The simplified queries look like this:   SELECT id FROM t1 WHERE condition1;   ;returns about 2k records which are stored

[SQL] Help with a view

2005-09-22 Thread Leif B. Kristensen
I've created a view 'principals' that gives me this output: pgslekt=> select * from principals where event=15821; person | event | place | sort_date | tag_type +---+---++-- 2 | 15821 | 1152 | 1999-09-17 |4 3 | 15821 | 1152 | 1999-09-17 |

[SQL] Help on function creating

2005-12-07 Thread Alexandre Gonçalves Jacarandá
Hello everyone, I'm using postgresql form an year and I have some difficult to write a function to make an report. I'm running PostgreSQL 7.5.3 on i686-pc-linux-gnu (Mandriva 10.1). My table structure is: Tabela "public.matricula" Column | Type |Modifiers

[SQL] Help with simple query

2005-12-28 Thread Collin Peters
I have a simple table called notes which contains notes for users. The table has 4 columns: note_id (auto-incrementing primary key), user_id (foreign key to a users table), note (varchar), and modified_date (timestamp). Is there a nice simple query I can run that will return me a list of all the

[SQL] help with a function

2001-06-06 Thread Clayton Cottingham aka drfrog
consider this function: CREATE FUNCTION "test" (integer) RETURNS text AS 'return "select * from testt limit $_[o];";' LANGUAGE 'plperl'; how would i get it to just run the query instead of just return it as text using plperl? ---(end of broadcast)

Re: [SQL] Help On Postgresql

2001-08-30 Thread Jeff Eckermann
a)  Look at "Date/Time Functions" in the docs: specifically, listed under "Functions and Operators" in the Users Guide. b) "Serial" type will do this.  Look under "Numeric Types" , in the "Data Types" section of the Users Guide. - Original Message - From: Jaydip To: [EMAIL

Re: [SQL] Help On Postgresql

2001-08-30 Thread Stephan Szabo
On Thu, 23 Aug 2001, Jaydip wrote: > a) How do I retrieve the Year,Month,Day,Hr,Minute or Second value from a >Date/DateTime variable. > > For Example : i> In Oracle to_char(dt,'') - for extracting the year value >from a date variable dt > ii> In SqlServer datepart(hh,

Re: [SQL] Help On Postgresql

2001-08-31 Thread Henshall, Stuart - WCP
a) Either of these should return the yaer (2001). See section 4.7 of the user guide SELECT EXTRACT(YEAR FROM TIMESTAMP '2001-02-16 20:38:40'); SELECT date_part('year', TIMESTAMP '2001-02-16 20:38:40'); b) The serial datatype will do this. It is actually just an int4 with a default value of nextva

[SQL] Help with function optimisation

2002-07-10 Thread Ian Cass
Hi, I've got a function that I run as a trigger to update a summary table on insert to the main table. As you can see below, it does a select & an INSERT if not found, or an UPDATE if found. This currently works OK, but I'd like to improve performance by removing the SELECT & attempting an UPDATE

Re: [SQL] Help tuning query

2002-09-26 Thread Dmitry Tkach
First of all, try replacing the username/foldername indexes on operator_messages with a single combined index on, say (username,foldername)... It is still not clear to me why it decides not to use one of those indexes you have (it would be less efficient than a combined index, but still better t

[SQL] Need some SQL help

2002-10-07 Thread Brian Ward
I have a table id int statusint create_dt datetime When users log in and out I insert a row into this table throughout the day. I'm trying though to come up with a querie to tell me and ordering of users as they report in in the morning so i'm trying to say select each user and the ea

  1   2   3   4   5   >