Re: [SQL] Search fields in multiple tables

2008-10-16 Thread Oliveiros Cristina
Message - From: "Raj Mathur" <[EMAIL PROTECTED]> To: Sent: Thursday, October 16, 2008 5:01 AM Subject: [SQL] Search fields in multiple tables Hi, I have some information about books spread over multiple tables (title, authors, ISBN, blurb, publisher, etc.) Is there any c

[SQL] Search fields in multiple tables

2008-10-15 Thread Raj Mathur
Hi, I have some information about books spread over multiple tables (title, authors, ISBN, blurb, publisher, etc.) Is there any convenient way in PostgreSQL to allow a user to search these in a single operation? If there is, would there be some way to assign weights to the fields? E.g. a mat

Re: [SQL] search path within trigger

2007-06-09 Thread Shoaib Mir
Did you try 'select current_schema' ? -- Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 6/9/07, chester c young <[EMAIL PROTECTED]> wrote: within a table pl/pgsql trigger, what's the easiest way to see if the schema for the triggered table is the same as search_path? ___

[SQL] search path within trigger

2007-06-09 Thread chester c young
within a table pl/pgsql trigger, what's the easiest way to see if the schema for the triggered table is the same as search_path? Be a better Globetrotter. Get better travel answers from someone who knows.

Re: [SQL] Search a range of cases/records

2007-02-05 Thread A. Kretschmer
am Thu, dem 01.02.2007, um 12:56:28 -0800 mailte Wei ZOU folgendes: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Greetings: > > I have a dataset of two columns: > price amount > 99.5 1 > 99.7 8000 > 1003000 > 100.1 1000 > 100.5 500 > 100.8 1500 > 1052000 > 200100

[SQL] Search a range of cases/records

2007-02-05 Thread Wei ZOU
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Greetings: I have a dataset of two columns: price amount 99.5 1 99.7 8000 1003000 100.1 1000 100.5 500 100.8 1500 1052000 200100 etc I have to write a SQL query on how many price tags are within [price+-1] such as 98.5 to 100.5,

Re: [SQL] search and replace

2004-06-13 Thread Benoît BOURNON
I do not try, may be it exists different languages to make this in postgresql : I make this in pl/pgsql, I do not have time to make this in C, CREATE OR REPLACE FUNCTION "_replaceblock" (text, text, text) RETURNS text AS' DECLARE  text_begin ALIAS FOR $1 ;  key_name ALIAS FOR $2 ;  key_val

[SQL] search and replace

2004-06-09 Thread Jodi Kanter
I have a field in one of my tables that has a path to a file listed. I need to move those files and now have to update all those paths. Is there a simply search and replace type option in sql? or do I need to do an update using the entire new path name? If so, I think the easier solution will b

Re: [SQL] search facilities

2003-11-12 Thread Martin Kuria
Subject: Re: [SQL] search facilities Date: Sat, 8 Nov 2003 10:49:41 +0300 (MSK) Check contrib/tsearch2 and http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2 for documentation Oleg On Fri, 7 Nov 2003, Martin Kuria wrote: > Hi, > I have a content management system, for my datab

Re: [SQL] search facilities

2003-11-08 Thread George Essig
Download the latest version of PostgreSQL and look in the contrib/tsearch or contrib/tsearch2 directories. For documentation, see: http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/ http://sourceforge.net/mailarchive/forum.php?forum_id=7671 George Essig ___

Re: [SQL] search facilities

2003-11-08 Thread Oleg Bartunov
Check contrib/tsearch2 and http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2 for documentation Oleg On Fri, 7 Nov 2003, Martin Kuria wrote: > Hi, > I have a content management system, for my database driven website developed > using php and postgresql but I don't know how to develop

[SQL] search facilities

2003-11-07 Thread Martin Kuria
Hi, I have a content management system, for my database driven website developed using php and postgresql but I don't know how to develop a search facility for it. How do I go about it?. I have seen database driven website developed using php and postgresql and they have their built search fac

Re: [NOVICE] [SQL] Search and Replace

2003-01-09 Thread Bruno Wolff III
On Thu, Jan 09, 2003 at 19:15:51 -0500, "Randy D. McCracken" <[EMAIL PROTECTED]> wrote: > > Hi Rajesh, > > I don't know why but the example you gave me did not work. Here is what > happened when I tried: > > == > > pubs_test=# UPDATE publications SET url = replace( 'www.srs.fs.fed.us

Re: [SQL] Search and Replace

2003-01-09 Thread Randy D. McCracken
On Thu, 9 Jan 2003, Ross J. Reedstrom wrote: > On Thu, Jan 09, 2003 at 11:00:32AM +0530, Rajesh Kumar Mallah. wrote: > > > > any anyone explain whats wrong with the replace based solution to this problem > > which i posted earlier? > > > > did i misunderstood anything? > > Probably just overkill -

Re: [SQL] Search and Replace

2003-01-09 Thread Ross J. Reedstrom
On Thu, Jan 09, 2003 at 11:00:32AM +0530, Rajesh Kumar Mallah. wrote: > > any anyone explain whats wrong with the replace based solution to this problem > which i posted earlier? > > did i misunderstood anything? Probably just overkill - I'm sure it would work, but, based on how the question was

Re: [SQL] Search and Replace

2003-01-08 Thread Rajesh Kumar Mallah.
any anyone explain whats wrong with the replace based solution to this problem which i posted earlier? did i misunderstood anything? regds mallah. On Thursday 09 January 2003 01:48 am, Randy D. McCracken wrote: > Just to close off another thread and to give a tad more information... > > I was

Re: [SQL] Search and Replace

2003-01-08 Thread Randy D. McCracken
Just to close off another thread and to give a tad more information... I was not clear enough in my initial question to the list because not all of the URLs I am trying to change begin with http://www.srs.fs.fed.us/ so what I was really looking for was the syntax for replacing "www.srs.fs.fed.us"

Re: [SQL] Search and Replace

2003-01-08 Thread Ross J. Reedstrom
On Wed, Jan 08, 2003 at 09:02:47AM -0500, Randy D. McCracken wrote: > I apologize for having to resort to sending what is most likely a simple > tech support question regarding PostgreSQL to this list but I have not > been able to find the answer in the documentation. Hey, this is Open Source: tha

Re: [SQL] Search and Replace

2003-01-08 Thread Rajesh Kumar Mallah.
REPLACE is the right function for you avaliable as an addon. install it in postgresql installation using the source at: http://www.brasileiro.net:8080/postgres/cookbook/view-one-recipe.adp?recipe_id=23 if you face problem please lemme know once this function is installed you could update like:

Re: [SQL] Search and Replace

2003-01-08 Thread Bruno Wolff III
On Wed, Jan 08, 2003 at 09:02:47 -0500, "Randy D. McCracken" <[EMAIL PROTECTED]> wrote: > > UPDATE publications SET url = 'www.srs.fs.usda.gov' WHERE url = > 'www.srs.fs.fed.us'; For simple cases you can do this with available string functions. For more complicated cases, you can write a simple

[SQL] Search and Replace

2003-01-08 Thread Randy D. McCracken
I apologize for having to resort to sending what is most likely a simple tech support question regarding PostgreSQL to this list but I have not been able to find the answer in the documentation. I am responsible for managing a database containing over 6,000 records of US Forest Service Research pu

Re: [SQL] Search by longitude/latitude

2001-10-08 Thread Joe Conway
> Hi all, > > I need to implement "Find all hospitals in a 5 mile radius". Say I have all > the coordinates on them stored in a table with the fields longitude and > latitude. Has anybody some sample code for that? > > Best regards, > Chris > Here's a plpgsql function that will do what you need.

Re: [SQL] Search by longitude/latitude

2001-10-08 Thread Colin 't Hart
Better still, check out PostGIS at http://postgis.refractions.net/ Cheers, Colin ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Re: [SQL] Search by longitude/latitude

2001-10-08 Thread James Orr
Here is some perl code which does what you want. - Original Message - From: "Chris Ruprecht" <[EMAIL PROTECTED]> To: "pgsql" <[EMAIL PROTECTED]> Sent: Monday, October 08, 2001 8:58 AM Subject: [SQL] Search by longitude/latitude > Hi all, > > I n

[SQL] Search by longitude/latitude

2001-10-08 Thread Chris Ruprecht
Hi all, I need to implement "Find all hospitals in a 5 mile radius". Say I have all the coordinates on them stored in a table with the fields longitude and latitude. Has anybody some sample code for that? Best regards, Chris _ Do You Yah

[SQL] search/replace in update

2001-06-14 Thread Gary Stainburn
Hi all, here in England OFTEL, the governing body for all things telephone recent hand another phone number dialing code change (one of many). This means that e.g. all mobile numbers that used to start 0589 now start 07889. Is there a way in SQL to update the phone number in-place? -- Gary S

Re: [SQL] Search

2001-02-06 Thread Jie Liang
Hi, You seem want to match string insensitively, I guess. Try: ~* 'test' -- match Test|tEst|tESt ... ~* '.*test.*' -- match whateverTesTwhatever Jie LIANG Internet Products Inc. 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED] www.ipinc.com O

Re: [SQL] Search

2001-02-06 Thread Brett W. McCoy
On Mon, 5 Feb 2001, Sebastian --[ www.flashhilfe.de ]-- wrote: > I have make a search machine whit: > > LIKE '%$suchbegriffe[$i]%' > > but when I search Test - the search machine shows only entries > whit Test. But not test or tESt. LIKE is case-sensitive. You should convert your column to uppe

[SQL] Search

2001-02-06 Thread Sebastian --[ www.flashhilfe.de ]--
Hi I hope someone can help me My problem: I have make a search machine whit: LIKE '%$suchbegriffe[$i]%' but when I search Test - the search machine shows only entries whit Test. But not test or tESt. (sorry for my bad english) Regards, Sebastian

Re: [SQL] search and replace possible on SQL?

2000-11-16 Thread Jens Hartwig
Hello Bruno, try the following: UPDATE journal SET description = 'Add '||description WHERE description LIKE '%PSF%; Is this what you wanted? Best regards, Jens Hartwig Bruno Boettcher schrieb: > > hello, > > again fiddling around with SQL... > wanted to loop over the Base search for S

[SQL] search and replace possible on SQL?

2000-11-16 Thread Bruno Boettcher
hello, again fiddling around with SQL... wanted to loop over the Base search for Strings beginning with a sequence and replace that sequence with another one. tryed the following: update journal set description='Add '||(select id description from journal subq where subq.description like '%PS

Re: [SQL] Search for underscore w/ LIKE

2000-07-07 Thread Peter Eisentraut
Tom Lane writes: > Exercise for the student: if you need to match a literal backslash > in a LIKE pattern, how many backslashes do you have to write in your > query? I like how Python handles this: You prefix the text literal with an `r' (as in "raw") and the backslashes are not special. Maybe w

Re: [SQL] Search for underscore w/ LIKE

2000-07-07 Thread Bruce Momjian
> I wrote: > > Similarly, '\\%' would be the way to match a literal %. You can > > actually backslash-quote any single character this way in LIKE, > > but % and _ are the only ones where it makes a difference. > > Er, check that. Backslash itself also needs quoting in LIKE. > > Exercise for th

Re: [SQL] Search for underscore w/ LIKE

2000-07-07 Thread Tom Lane
I wrote: > Similarly, '\\%' would be the way to match a literal %. You can > actually backslash-quote any single character this way in LIKE, > but % and _ are the only ones where it makes a difference. Er, check that. Backslash itself also needs quoting in LIKE. Exercise for the student: if yo

Re: [SQL] Search for underscore w/ LIKE

2000-07-07 Thread Tom Lane
[EMAIL PROTECTED] writes: > How do I use LIKE to search for strings with an underscore? The > documentation (well, Bruce's book) says to use 2 underscores (__) but it > doesn't work. If Bruce's book says that, I hope it's not too late for him to change it ;-) The correct way is to escape the und

[SQL] Search for underscore w/ LIKE

2000-07-07 Thread brianb-pgsql
How do I use LIKE to search for strings with an underscore? The documentation (well, Bruce's book) says to use 2 underscores (__) but it doesn't work. For example: create table liketest ( somestr varchar(50) ); insert into liketest values ('foo_bar'); insert into liketest values ('foobar');