Hello forum members

I have an issue getting a SelectSQL service to work. I am selecting rows from a database for an external application so cannot change column type to TIMESTAMP. The issue is one of the columns I am selecting on is defined as TIMESTAMP(6) WITH LOCAL TIME ZONE. When I include this column in the service I get an error:

b The database session time zone is not set[/b]

Is there any way to set the session time zone? I have also tried CustomSQL and DynamicSQL services, but the same issue occurs with those two. I also tried to add the ALTER SESSION SET TIME_ZONE = LOCAL statement before the main query but since the services cannot run multiple queries, this is not possible. If there is no way to set the session time zone, is there an alternative way to get the column data out. I would also like to highlight that since this is an external application database a stored procedure is also out of the question.

Any help would be appreciated.


Yunus Aswat.

you can try to create a stored procedure on the server side, with timezone as a parameter, so you can run SET TIMEZONE first.

Thanks, for the suggestion. I did mention since the database belongs to an external app creating a stored procedure is out of the question.

I did manage to get around the problem by creating a CustomSQL statement and for the TIMESTAMP(6) WITH LOCAL TIME ZONE column used the to_char function like this:

to_char(complete_dstamp, ‘YYYY-MM-DD"T"HH24:MI:SS’)

Not the best way, but due to the limitations of the JDBC Adapter I don’t see another solution.