User Profile
Collapse
-
Thanks, thats it. :) -
Use xhtml inside XML based on XSL
I have a XSL-file who generate output to a browser through information in a XML-file. It works fine, but now I also want to use some xhtml-tags in this XML-file. I've tried to do it like this when i want to use xhtml-tags:
But it does not seem to work. The browser shows the text, but not as «strong». Do I need to include...Code:<strong xmlns="http://www.w3.org/1999/xhtml">strong text</strong>.
-
well, i found a not very elegant solution. Set onerror="contin ue" in the ant sql-task. it still generates error when the database exists offcourse, but it works ok i guess...Leave a comment:
-
Sorry for not being very specific. We have a sql ant task, only used in development, where we set up the database. This task shall run both when the database does exist and when it does not. So we can’t do something like if(not exists){ create database}, because we call a “pure” sql script from the ant task. We have to do this in sql or pl/pgsql or something I guess. But it seems like I can’t create a database from inside a function, and...Leave a comment:
-
forget the last post. I almost found a solution using a pl/pgsql function. but i get this error: "ERROR: CREATE DATABASE
cannot be executed from a function"...
It works fine when i try to create a new role (only when it does not exists) though.
here is the code:
...Code:CREATE OR REPLACE FUNCTION createusertest() RETURNS void AS ' DECLARE user_rec RECORD; BEGIN select into
Leave a comment:
-
Thank you. The problem is how to use "if" or "case" before create database... i've created a plpgsql function, but this seems to only work from the command prompt and not trough jdbc...
...Code:CREATE OR REPLACE FUNCTION createdbtest() RETURNS void AS $t$ BEGIN SELECT datname FROM pg_database WHERE datname='test''; IF datname='test' THEN CREATE DATABASE test PASSWORD 'test';
Leave a comment:
-
create database test if not exists
create database test if not exists. Someone know how to do this in postgreSQL? -
You are right. I figured it out myself actually, but thanks anyway.
I did it this way, a bit longer, but in principal almost the same:
...Code:SELECT to_char(date, 'YYYY') to_char(date 'Month'), to_char(date, 'DD'), to_char (date, 'Day'), sum(price) FROM sales WHERE hotel_id = 1 and date > '2006-10-09' GROUP by to_char(date, 'YYYY') to_char(date 'Month'), to_char(date, 'DD'), to_char (date, 'Day')
Leave a comment:
-
Sum of “sales” for each date in a timestamp column
Hi!
I have a table named sales with the columns date (timestamp) and price (bigdecimal or something). I want to get the sale for each day (the sum of ‘price’ for all the rows with the same ‘date’). Like:
2006-10-10, 17 sales, 1500.00 $
2006-10-11, 15 sales, 1400.00$
etc…
This is how I try to do it:
SELECT to_char(date, 'YYYY'), to_char(date, 'Month'), to_char(date, 'DD'), to_char(date,...
No activity results to display
Show More
Leave a comment: