Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 2169

ADS12: Year(SomedateColumn) = xx with Index on SomedateColumn produces no results

$
0
0

Hello,

 

I have a small Bugreport for ADS 12.0.0.0, free Table:

A simple SQL Statement executed in ARC32 like "select * from sometable where year(somedatecolumn) = 2016" fails if the Table has an index on somedatecolumn.

 

SQL to test:

 

Create Table BUGTEST(

   ID AutoInc,

   Somedate TimeStamp);

 

EXECUTE PROCEDURE sp_CreateIndex90( 'BUGTEST', 'BUGTEST.adi', 'PRIMARY', 'Somedate', '', 2, 1024, NULL );

 

insert into BUGTEST (Somedate) VALUES (now());

 

select * from BUGTEST where Year(SomeDate) = Year(now())

 

 

This SQL should select one column but it does not! If you change "Year(SomeDate) = Year(now())" to "Year(SomeDate) >= Year(now())" or drop the Index on Somedate it works.

 

This seems like a bug or am I doing something wrong? In all previous versions everything worked correct.

 

Kind regards,

Wolfgang Hanke


Viewing all articles
Browse latest Browse all 2169

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>