How to include sql function in an sql query in Dataset using Opentext Birt tool
Hello,
I would like to add an sql function in the SQL query using Case condition in the Dataset using BIRT tool. Could anyone please help me how to write a query for this. Or if there any other option like mapping in the tool. Thanks in advance.
Comments
-
The query syntax depends on the database. Birt doesn't have its own query language. It simply passes the query to the database through the database driver and the result is returned. Look at what the database expects for syntax. You can find the syntax by searching the web, looking at the database user guide, or asking on a forum for the database you are using.
Warning No formatter is installed for the format ipb0 -
Hello Jeff,
Good day!
I have to write an if condition like :
if ID matches - then do update to the remaining columns of that ID.
else - then do insert that values into the table.
But I have to write this condition in PGSQL. Here I am trying to use MERGE in the function. But after that I am getting an error. Could you please help me how to merge in pgsql.Thanks in advance.
Warning No formatter is installed for the format ipb0 -
@Sai Krishna said:
Hello Jeff,Good day!
I have to write an if condition like :
if ID matches - then do update to the remaining columns of that ID.
else - then do insert that values into the table.
But I have to write this condition in PGSQL. Here I am trying to use MERGE in the function. But after that I am getting an error. Could you please help me how to merge in pgsql.Thanks in advance.
Please find the error message below:
Warning No formatter is installed for the format ipb0 -
Hi Jeff,
It was the user-defined table name "insertt" created by me. I have given two t's to make it different with the keyword 'insert'.
Warning No formatter is installed for the format ipb0 -
@Sai Krishna said:
Hi Jeff,It was the user-defined table name "insertt" created by me. I have given two t's to make it different with the keyword 'insert'.
And Could you also please tell me how to use MERGE in postgre SQL. I am getting the above error while I am running the below code in the postgre SQL function.( I am using pgAdmin III). Please let me know if I have done any mistake in the code while creating the function.
Code:-
_BEGIN
MERGE INTO insertt as target USING (values(uusername, ttime)) AS source ON (target.user_name = source.uusername) THEN MATCHED and target.user_name source.uusername THEN UPDATE SET target.scrolltime = source.ttime WHEN NOT MATCHED BY target THEN INSERT (user_name, scrolltime) VALUES (source.uusername, source.ttime);
END; _
Thanks in advance.
Warning No formatter is installed for the format ipb0 -
There are examples here: https://wiki.postgresql.org/wiki/MergeTestExamples
Warning No formatter is installed for the format ipb0
Categories
- All Categories
- 109 Developer Announcements
- 49 Articles
- 100 General Questions
- 122 IM Services
- 40 OpenText Hackathon
- 31 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 897 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 123 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management