Re: [SQL] DELETE WHERE EXISTS unexpected results

2010-12-01 Thread Jasen Betts
On 2010-11-30, Jeff Bland wrote: > This is a multipart message in MIME format. > --=_alternative 007A6509852577EB_= > Content-Type: text/plain; charset="US-ASCII" > > I want to delete certain rows from table USER_TBL. > Two tables are involved. USER_TBL and OWNER_TBL. delete ... using was inv

Re: [SQL] DELETE WHERE EXISTS unexpected results

2010-12-01 Thread Jeff Bland
The second example you gave worked for me. Thanks Carla ! D. Jeff Bland z/OS System House Installation and Packaging (zSHIP) BLAND at IBMUS bl...@us.ibm.com http://w3.pok.ibm.com/zos/i95a/ 845-435-42108/295-4210 Famous quote: Beauty is in the eye of the beer holder. From: Carla To: Jeff

Re: [SQL] How strings are sorted by LC_COLLATE specifically?

2010-12-01 Thread Chang Chao
Hi Peter. When I looked into the source(),came to know that strings are sorted like this. int result = strcoll(a, b); if (result == 0) { result = strcmp(a,b); } return result; On Wed, Dec 1, 2010 at 4:31 AM, Peter Eisentraut wrote: > On tor, 2010-11-25 at 14:42 +0900, Chang Chao wr

Re: [SQL] OT - load a shp file

2010-12-01 Thread John Fabiani
On Wednesday, December 01, 2010 01:13:52 am Lee Hachadoorian wrote: > John, > > Would probably be useful to see the results of the command, but a couple > of things are immediately obvious. > > First, Postgres requires identifiers to start with a letter or > underscore. You are attempting to crea

Re: [SQL] DELETE WHERE EXISTS unexpected results

2010-12-01 Thread Carla
You don't have to include the name of the "delete table" in the subselect. Wrong: DELETE FROM SP.TST_USER_TBL WHERE EXISTS (SELECT SP.TST_USER_TBL.NAME FROM *SP.TST_USER_TBL, *SP.TST_OWNER_TBL WHERE TYPE='BLAND' AND PLACE='HOME' AND SP.TST_OWNER_TBL.NAME

Re: [SQL] OT - load a shp file

2010-12-01 Thread Lee Hachadoorian
John, Would probably be useful to see the results of the command, but a couple of things are immediately obvious. First, Postgres requires identifiers to start with a letter or underscore. You are attempting to create a table named 2008_us_county, which is not a legal identifier. Also, unless you

Re: [SQL] aggregation question

2010-12-01 Thread Samuel Gendler
On Tue, Nov 30, 2010 at 7:47 PM, Samuel Gendler wrote: > I have a fact table with a number of foreign keys to dimension data and > some measure columns. Let's assume I've got dimension columns a,b,c,d,e, > and f and measure columns x, and y. > > I need to be able to find the value of f, x, and y