create variable aDate date;
create variable aTime time;
create variable aDateTime Datetime;

set aDate = current date;
set aTime = current time;
set aDateTime = aDate + aTime;

select aDate, aTime, aDateTime, *
from *remoteTable*

The propery aDateTime wil show the correct date time, but if you add aDate+aTime the system will give an error. This is because the space is removed between the date and time.

Is this the expected behaviour or a bug?

asked 26 May, 09:04

Frank's gravatar image

Frank
682202641
accept rate: 22%

What remote DBMS are you using? When using proxy tables on MS SQL, querying for dates still fails for me, see here...

(26 May, 09:21) Volker Barth

I have tried this with a proxy table for SQLA Demo Departments table and the following:

   create or replace variable aDate date;
   create or replace variable aTime time;
   create or replace variable aDateTime Datetime;

   set aDate = current date;
   set aTime = current time;
   set aDateTime = aDate + aTime;

  select 
     @@version, 
     aDate, aTime, aDateTime, 
    aDate + aTime, * 
  from departments 
  where DepartmentID = 100;

I get no errors.

It would helpful to know the remote server type and the specific error that is being reported.

(26 May, 14:55) Chris Keating
Comment Text Removed
Comment Text Removed
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×19
×17

question asked: 26 May, 09:04

question was seen: 66 times

last updated: 27 May, 02:27