[SQL] Recursively traversing a partially ordered set

2007-05-29 Thread Jason Grout
ks for your help. Thanks for the absolutely wonderful database and solid documentation. I originally did this project in MySQL and had the weirdest errors (the errors turned out to be due to the default case-insensitive collation of MySQL!). That's when I decided t

Re: [SQL] Change of data type

2006-08-07 Thread jason nordwick
On pg8, to change tab.col to type t: alter table tab alter column col type t so: alter table tab alter column material type text -j Judith wrote: Hello everybody, excuse me how can I change de data type of a field, I currently have: material character(30) but I now want the fi

[SQL] Error: out of memory in create table as

2006-08-03 Thread jason nordwick
e 30 at SQL statement I don't see any temp files being generated on disk. Attached is our postgresql.conf file. We have little Postgres experience (mostly either Oracle, Sybase IQ, etc..) -jason P.S., lack of an upsert is really killing us. # --

Re: [SQL] Using In Clause For a Large Text Matching Query

2006-06-30 Thread Jason Farmer
Ah, I do think that sounds about like what I want! Let me play with this one some, thanks so much!! Richard Broersma Jr wrote: Well, there is also: href="http://www.postgresql.org/docs/8.1/interactive/functions-comparisons.html#AEN13377";> /expression/ /operator/ ANY (/array expression/). So,

[SQL] Using In Clause For a Large Text Matching Query

2006-06-29 Thread Jason Farmer
sounds confusing please let me know, and I will be sure to clarify! Thanks for any help or direction anyone can provide!! - Jason Farmer ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

[SQL] Changing location of ORDER BY has large effect on performance, but not results...

2005-11-03 Thread Jason Turner
broken to me. I am running 8.0.4 on Gentoo Linux. Thanks, Jason --- First Query --- select foo.*, genre.genrename, album.albumtitle, (select performer.performername from performer as p, trackperformers as tp where p.performerid = tp.performerid and tp.trackid = foo.trackid limit 1) AS

Re: [SQL] Home-brewed table syncronization

2003-07-09 Thread Jason Earl
d and a timestamp? The changelog table could be maintained via triggers (on update, insert, or delete). Your synchronization software could then be relatively simple. It would simply need to check your changelog table for rows that have changed. Jason ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [SQL] Cross-database references

2003-01-28 Thread Jason Turner
d be capital-D Difficult to implement with transaction support. Then there's the further tearing asunder of the ANSI SQL standard... Jason -- Indigo Industrial Controls Ltd. 64-21-343-545 [EMAIL PROTECTED] ---(end of broadcast)--- TIP 6: Have yo

[SQL] corresponding primary key for max(column)?

2002-12-23 Thread Jason Pyeron
contains the max(ts) group by ref. -jason pyeron assetdb=# \d locations Table "locations" Column | Type | Modifiers +--+-- id

[SQL] Cross tables Like%

2002-09-09 Thread Jason Davis
I have 2 tables, one is products and one is manufactors. The products table has a col. for Product_descriptions and manufactor_id column that is a foriegn key to the manufactors table. The manufactors table has a manfuactor_description column, for each unique Manufactor_id. I want to search (us

Re: [SQL] serial column vs. explicit sequence question

2002-06-13 Thread Jason Earl
#x27;foo_id_seq' for SERIAL column 'foo.id' NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index 'foo_pkey' for table 'foo' CREATE test=# create table bar (master int references foo, detail text); NOTICE: CREATE TABLE will create implicit trigger(s)

Re: [SQL] system maintained keys

2001-10-19 Thread Jason Earl
bye'); And then when you select you get: processdata=> SELECT * FROM foo; prim_key | bar --+- 1 | hello 2 | goodbye (2 rows) I hope that is helpful, Jason Earl --- Stefan Lindner <[EMAIL PROTECTED]> wrote: > Is there any way to get system mai

Re: [SQL] Triggers do not fire

2001-10-17 Thread Jason Earl
, on the other hand, triggered a sequential scan that took a long time to complete. In other words, chances are good that PostgreSQL will handle your data without special modification. Jason --- Tom Lane <[EMAIL PROTECTED]> wrote: > Reiner Dassing <[EMAIL PROTECTED]> writes: > &

Re: [SQL] ORDER BY case insensitive?

2001-10-04 Thread Jason Earl
index like: create index MyTable_lower_idx on MyTable (lower(name)); It won't help with your particular query, but it certainly would help for queries like: SELECT * FROM MyTable WHERE lower(name) = 'jason'; It is also possible to create a trigger that would automatically lowercase i

Re: [SQL] to_date/to timestamp going to BC

2001-10-04 Thread jason . servetar
, October 04, 2001 2:42 AM To: Tom Lane Cc: Servetar, Jason; [EMAIL PROTECTED] Subject: Re: [SQL] to_date/to timestamp going to BC On Wed, Oct 03, 2001 at 05:14:02PM -0400, Tom Lane wrote: > [EMAIL PROTECTED] writes: > > Can someone tell me if this is a bug with the date functions or am I using

Re: [SQL] ORDER BY case insensitive?

2001-10-04 Thread Jason Earl
SELECT * FROM MyTable ORDER BY lower(Name); Should do the trick. Jason Earl --- Bob Swerdlow <[EMAIL PROTECTED]> wrote: > How do I get the rows sorted in a case insensitive > way? > > I have some queries that basically fit the form: > SELECT * FROM MyTable ORDER B

Re: [SQL] to_date/to timestamp going to BC

2001-10-03 Thread jason . servetar
--- March 11, 1997 | 1997-03-11 | 1997-03-11 00:00:00-07 -Original Message- From: Tom Lane [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 03, 2001 3:14 PM To: Servetar, Jason Cc: [EMAIL PROTECTED] Subject: Re: [SQL] to_date/to timestamp going to BC [EMAIL PROTECTED] writes: >

[SQL] to_date/to timestamp going to BC

2001-10-03 Thread jason . servetar
Can someone tell me if this is a bug with the date functions or am I using them incorrectly? If anyone has a workaround for this I could use some help this data conversion. dev=> create table test_date (dt varchar(100)); CREATE dev=> insert into test_date values ('March 11, 1997'); INSERT 706020

[SQL] HELP: Trend reporting

2001-08-30 Thread Jason Charette
reciated. Thanks in advance, Jason ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [SQL] changes to table creation syntax in 7.1.2?

2001-08-29 Thread Jason Earl
It looks like it works here :(. Do you have an error message? processdata=# select version(); version --- PostgreSQL 7.1.2 on i686-pc-linux-gnu, compiled by GCC 2.95.4 (1 row) pr

[SQL] Date: the day before yesterday.

2001-08-14 Thread Jason
I am trying to retrieve records generated in the passed two days and encountered difficulties in dealing with the date in Oracle. Here is the query I try to form: select * from Table where InputDate>=[the day before yesterday] I tried "sysdate-2", didn't work. Any suggestio

[SQL] Re: [NOVICE] Arithmetic operation on DATE

2001-08-14 Thread Jason Wong
I know you can do it for days, thus: expires = CURRENT_TIMESTAMP + 10 would be 10 days from now. Don't know about months though. HTH -- Jason Wong Gremlins Associates www.gremlins.com.hk - Original Message - From: macky <[EMAIL PROTECTED]> To: <[EMAIL PROTEC

[SQL] Re: [NOVICE] Knowing new item in table...

2001-08-03 Thread Jason Earl
ally is fairly easy to do. Simply define your table like this: CREATE TABLE foo ( insert_time timestamp DEFAULT CURRENT_TIMESTAMP, nametext ); Once your table is created you simply insert into table foo ignoring the insert_time column like so: INSERT INTO foo (name) VALUES (&#x

[SQL] Updated rowcount

2001-07-10 Thread Jason Alexander
OWCOUNT = 0 INSERT INTO tablefoo . . . . And, so on... TIA, -Jason ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

[SQL] Re: drop table if exists

2001-07-03 Thread Jason Watkins
Doesn't work. I like wrapping up the entire file in a transaction so that if I make a stupid syntax error or the like, I can just do a rollback. Because of that, the transaction enters abort state. I suppose I can just stop using transactions and use this method. ---(end

[SQL] drop table if exists

2001-07-03 Thread Jason Watkins
How can I duplicate the behavior of: DROP TABLE IF EXISTS mytable; CREATE TABLE mytable ( blah, blah ); INSERT INTO mytable (blah) VALUES (blah); in other words, so that I have a single sql file that restores the database to a known state. ---(end of broadcast)---

Re: [SQL] batch file

2001-05-25 Thread Jason Earl
I just put files commands that I want in some file like "foo.sql" and then do: psql mydatabase -f foo.sql Is this what you are looking for? Jason --- Milen <[EMAIL PROTECTED]> wrote: > Hi all!, > > I want to execute several SQL statements one after > another.

Re: [SQL] system time

2001-05-15 Thread Jason Earl
Try using: SELECT now() It should do what you want. If not there are a whole pile of date functions. Look them up in the Users Guide. Hope this is helpful. Jason --- Seema Noor <[EMAIL PROTECTED]> wrote: > is there any function from which i can get syst

Re: [SQL] Sorting and then...

2001-04-10 Thread Jason Earl
SELECT name FROM test ORDER BY id DESC LIMIT 10; Take care, Jason --- Wei Weng <[EMAIL PROTECTED]> wrote: > Suppose I have a table > > create table test > ( > id integer, > name text > ); > > And I want to get the names of the largest 10 &qu

Re: [SQL] Birthday search.

2001-03-22 Thread Jason Earl
s some 21000 records out of a 12 record table on my desktop test machine (PII 400 96M Ram standard IDE hard drive running Linux) without any indexes on exit_dt in a couple of seconds. For more information check out the user guide section on date/time functions. It is quite interesting. The ex

Re: [PHP-DB] Re: [SQL] a script that queries database periodically

2000-12-03 Thread Jason
On Mon, Nov 27, 2000 at 02:56:59PM -0700, Roberto Mello wrote: > > PHP does not have a scheduling facility? AOLserver (the web/application > server that powers AOL) has had such facility (and many many others for > db-backed websites) since 1995. ns_schedule_proc. > http://www.aolserv

[SQL] Re: [PHP] a script that queries database periodically

2000-11-30 Thread Jason
> I was thinking of writing up a PHP script and put into crontab, which is > somehow easier than a shell script, but PHP is an apache module, so I > cannot execute PHP under crontab (it has to be executed in a browser > right?). I guess a shell script is necessary. So, is it possible to > call '

[SQL] copy DELETES to audit table

2000-08-21 Thread jason watkins
d the ability to remove rows the ability to do so, but to not loose the information for a week or so, so that the choice can be double checked by someone else. jason watkins

[SQL] SQL Server and C++ Data Types

2000-06-01 Thread Jason . Weiss
I am trying to convert my C++ data types into SQL Server data types. I found a short list on Microsoft's website, but it did not list all of the types. I was wondering if you could give me a list of the conversions or could direct me where to go.