Re: [SQL] How fetch multiple rows into one text-field?

2009-07-31 Thread Joshua Tolley
On Fri, Jul 31, 2009 at 10:09:46PM +0200, Andreas wrote: > Hi, > > how can I fetch multiple rows into one text-field? > I need the contents of some log-infos condensed into a single text to > show in a report. It sounds like you might want something like this: SELECT ... array_to_string(array_a

[SQL] How fetch multiple rows into one text-field?

2009-07-31 Thread Andreas
Hi, how can I fetch multiple rows into one text-field? I need the contents of some log-infos condensed into a single text to show in a report. There is a log with a single record per event. The log is like this (log_id, case_id, log_date, log_category, log_notes) I need a date-ordered list o

Re: [SQL] on error resume next

2009-07-31 Thread Jasmin Dizdarevic
Hi, that's not really that what i need. I think i will solve it on client side. thank you. jasmin 2009/7/31 Andreas Wenk > Jasmin Dizdarevic wrote: > >> hi, >> can i use savepoints to realize something like "on error resume next"? >> i've got the following situation: >> begin; >> 1. create

Re: [SQL] on error resume next

2009-07-31 Thread Andreas Wenk
Jasmin Dizdarevic wrote: hi, can i use savepoints to realize something like "on error resume next"? i've got the following situation: begin; 1. create view user001.accounts as select * from base.accounts; 2. grant select on user001.accounts to loginuser001; commit; begin; 3. create view

Re: [SQL] SQL report

2009-07-31 Thread Rob Sargent
Did you look at the query plans for the various record counts? That might show which index is missing or misinformed :). I wonder if clustering the status table on objectid would help? This does then require maintenance so you might only load it at 75%. wkipj...@gmail.com wrote: Hi Rob,

[SQL] on error resume next

2009-07-31 Thread Jasmin Dizdarevic
hi, can i use savepoints to realize something like "on error resume next"? i've got the following situation: begin; 1. create view user001.accounts as select * from base.accounts; 2. grant select on user001.accounts to loginuser001; commit; begin; 3. create view user002.accounts as select * fr

Re: [SQL] Show CAS, USD first; the left ordered by currency name

2009-07-31 Thread Emi Lu
"order by code not in ('USD', 'EUR', 'CAD') , code" is exactly what I was looking for! Good to know how "order by not in" works and thank you very much for all your inputs! -- Lu Ying ...order by currency not in('USD', 'AND', 'CAD'); this condition will be avaluated as FALSE for USD, AND

Re: [SQL] Show CAS, USD first; the left ordered by currency name

2009-07-31 Thread bricklen
Alternatively, ... ORDER BY (case when code in ('USD','CAD') then 0 else 1 end),code On Fri, Jul 31, 2009 at 4:37 AM, Harald Fuchs wrote: > In article <4a71f9cb.9050...@encs.concordia.ca>, > Emi Lu writes: > >> Good morning, >> I have a currency table (code, description). > >> Example values: >>

Re: [SQL] Show CAS, USD first; the left ordered by currency name

2009-07-31 Thread Harald Fuchs
In article <4a71f9cb.9050...@encs.concordia.ca>, Emi Lu writes: > Good morning, > I have a currency table (code, description). > Example values: > ADF | Andorran Franc > ... ... > ANG | NL Antillian Guilder > AON | Angolan New Kwanza > AUD | Australian Dollar > AWG | Aruban Florin > BBD |