Re: [SQL] Query question

2012-01-28 Thread Lew
you didn't use a separate alias for the FROM in the correlated subquery. Doesn't STRPOS() return INTEGER, not TEXT? -- Lew Honi soit qui mal y pense. http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes

Re: [SQL] extracting location info from string

2011-05-25 Thread Lew
Tarlika Elisabeth Schmitz wrote: Lew wrote: That isn't a table structure, that's a freeform text structure. You didn't state your question, Tarlika, but your database structure is terrible. For example, region and country should be different columns. I presume you are referring to my

Re: [SQL] extracting location info from string

2011-05-23 Thread Lew
? -- Lew Honi soit qui mal y pense. http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: [SQL] replace with nothing

2011-05-12 Thread Lew
://www.postgresql.org/docs/9.0/interactive/functions-string.html#FUNCTIONS-STRING-OTHER replace(string text, from text, to text) -- Lew Honi soit qui mal y pense. http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your

Re: [SQL] Dates and NULL's`

2011-05-10 Thread Lew
, since none of these evaluates to TRUE. -- Lew Honi soit qui mal y pense. http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: [SQL] check constraint bug?

2011-05-09 Thread Lew
expression Scott indicated is equivalent to the parenthesis-minimal CHECK ( NOT ( sex = 'f' AND stats IS NOT NULL ) ) or CHECK ( sex != 'f' OR stats IS NULL ) -- Lew Honi soit qui mal y pense. http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg -- Sent via pgsql-sql mailing list (pgsql-sql

Re: [SQL] group by hour + distinct

2010-11-26 Thread Lew
-SUBQUERIES http://www.postgresql.org/docs/9.0/interactive/functions-subquery.html Or try: http://lmgtfy.com/?q=SQL+subquery -- Lew -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: [SQL] Question regarding indices

2010-09-12 Thread Lew
a WAG. -- Lew -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: [SQL] is there a distinct function for comma lists ?

2010-09-07 Thread Lew
still true of more than one equal subquery row is found. It's not true multiple times, it's just true. If mytable.id is not unique, then every row with that value will be selected, but adding DISTINCT to the IN list won't change that either. -- Lew -- Sent via pgsql-sql mailing list (pgsql-sql

Re: [SQL] Common table expression - parsing questions

2009-10-05 Thread Lew
(top-posting corrected) Thomas Kellerer wrote: The standard *requires* the keyword. the6campbells wrote: the db2 [sic] family does not Ergo DB2 is not standard-compliant in that regard. -- Lew -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your

Re: [SQL] Hibernate, web application and only one sequence for all primary keys

2009-09-19 Thread Lew
learning, I use a system on Linux with Java and PostgreSQL. It works just fine. I'm not familiar with Grails. -- Lew -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: [SQL] Odd sort behaviour

2009-09-03 Thread Lew
of locales, to formalize such rules so that you can coerce your system to follow one or another set as needed. That way you don't have to agree or disagree with any rule, such as ignoring punctuation in the sort, simply be aware of whether it applies to any given situation. -- Lew -- Sent via

Re: [SQL] Race condition in resetting a sequence

2007-08-09 Thread Lew
to autoincremented keys makes the case that there is also a performance penalty, and in the more critical performance area of code development and correctness than in the less critical search speed area. -- Lew ---(end of broadcast)--- TIP 3: Have you checked

Re: [SQL] hi

2007-05-19 Thread Lew
something confidential then placing it into the public eye in an archived forum where it will be visible by everybody forever. Now we can publish everything ever written at or by Infinite Computer Solutions without fear of liability. -- Lew ---(end of broadcast

Re: [SQL] Floating point type to store numbers

2007-04-22 Thread Lew
to be a big problem. (One quick primer that can help you understand this is at http://www2.hursley.ibm.com/decimal/decifaq1.html.) Would you rather have wrong answers really, really fast, or right answers fast enough? -- Lew ---(end of broadcast