In article ,
Joel Stevenson writes:
> select tally_table. tally_mon, met.datum
> from (
> select distinct date_trunc( 'month', '2011-06-01'::date + tally_day )::date
> as tally_mon
> from generate_series( 0, ( select current_date - '2011-06-01'::date ) ) as
> tally_day
> ) as tally_table fu
On 19/10/11 22:08, Rich wrote:
> I have a mumps database with an ODBC connection so I can write queries
> from other databases. How can I write a sql in Postgresql to access
> this table to use in my Postgresql reports?
Use dbi-link to make an ODBC connection to the other database. Either
copy th
On Oct 22, 2011, at 10:07, Pavel Stehule wrote:
> 2011/10/22 David Johnston :
>> On Oct 22, 2011, at 6:41, Linos wrote:
>>
>>> Hi all,
>>>i need a little of advice on what could be the best way to store this
>>> information.
>>>
>>> We need to calculate the difference in costs for our oper
I have a situation where data in a text column contains line breaks of the
form \r\n
if I run a select such as select count(1) from table where wordcol =
'word1\r\nword2' I get 0.
Same if I run select count(1) from table where wordcol = 'word1\nword2'.
I get values if I run select count(1) from
I have a mumps database with an ODBC connection so I can write queries from
other databases. How can I write a sql in Postgresql to access this table
to use in my Postgresql reports?
You can't do that in THAT way, but you can use dynamic SQL:
test=# select * from drop_role ;
t
foobar
(1 row)
test=*# do $$ declare r text; begin for r in select t from drop_role loop
execute 'drop role ' || quote_ident(r) || ';'; end loop; end; $$language
plpgsql;
DO
"Bric
Thanks very much for those info.
>From what I read, I think Veil will do the trick.
I already use ROLES, but there are a few probems with them :
- first, as I mix the data from different users in the same table, ROLES
do not solve the complete problem.
- second, this forces me to use a dedi