[SQL] Regular expression query

2000-08-24 Thread Rodger Donaldson
bility to make inferences about regexps vs. LIKEs. The other aspect of this is that it seems that postgresql's regexp engine doesn't understand some expected regexps; I've tried both escaped and unescaped versions of, eg \w, \s, \n and so on a pg seems to ignore them. Am I

Re: [SQL] Wild Cards

2001-01-26 Thread Rodger Donaldson
an use * to mean all the fields in a table in a > SELECT statement, but if you are using LIKE in a WHERE clause, the > wildcards are % to mean any group of characters and _ to mean any single > character. Although, of course, you can use POSIXlish regexps with the ~* and ~

Re: [SQL] CSV import

2003-01-28 Thread Rodger Donaldson
r > off using an existing solution (like a Perl module) to > preprocess your data. The DBD::CSV module allows one to use a subset of SQL syntax on CSV files, as an example. Docs are at http://search.cpan.org/author/JZUCKER/DBD-CSV-0.2002/lib/DBD/CSV.pm -- Rodger Donaldson [EMAIL PROTECTE

[SQL] Cross-table constraints

2003-01-28 Thread Rodger Donaldson
ion, and do not have an option to require no match. Am I missing something obvious (syntax for UNIQUE, for example), or trying to do something that just doesn't work that way? -- Rodger Donaldson[EMAIL PROTECTED] "How do I set my laser printer for st

Re: [SQL] Cross-table constraints

2003-01-29 Thread Rodger Donaldson
> On Tue, 28 Jan 2003, Rodger Donaldson wrote: > > > Now, adding a UNIQUE constraint on the pk for add_queue weeds out > > dupes there. However, attempting to add a cross-table UNIQUE check > > with: > > > > alter table add_queue add constraint add_queue

[SQL] to_date has beaten me...

2003-02-05 Thread Rodger Donaldson
...and so forth, but despite the column in question being a timestamp with timszone, everything except the date gets truncated. -- Rodger Donaldson[EMAIL PROTECTED] "My ATEX terminal isn't working" "Is there power to the keyboard?" "No, and it has

Re: [SQL] to_date has beaten me...

2003-02-05 Thread Rodger Donaldson
On Wed, Feb 05, 2003 at 11:22:57PM -0500, Tom Lane wrote: > Rodger Donaldson <[EMAIL PROTECTED]> writes: > > values (to_date('06/Feb/2003:11:29:11 +13', 'DD/Mon/:HH24:MI:SS'),0,302, > > > Always inserts the correct date, but sets the time to mi

Re: [SQL] set decimal point in SQL

2003-06-18 Thread Rodger Donaldson
round(foo, 2) frombar ...will give you values in column foo rounded to 2 decimal places. -- Rodger Donaldson[EMAIL PROTECTED] I don't mind straight people, as long as they act gay in public ---(end of broadcast)--- TIP 8: e

[SQL] Applying SUM twice in the same query.

2000-07-14 Thread Rodger Donaldson
_name; ...which is producing: server_name|number|total ---+--+- AiNET Apache |19| 84 Apache | 1216| 840 Draupnir |19| 84 I assume I'm creating a product of the query, but I'm not sure how to fix it. -- R

Re: [SQL] Database authentication and configuration

2000-07-19 Thread Rodger Donaldson
of your pg_hba.conf file. You will most likely find that you're set up to trust local users. You can force authentication by changing this to password, crypt, or kerberos based authentication. -- Rodger Donaldson[EMAIL PROTECTED] "Forgive us if we bite your head off; we we