posted 12 years ago
Hello ,
I am trying to create an Index in UDB on a column with SCALAR functions. Can someone help me to get the correct syntax. I tried some statements, but it didnot helpme.
Requirement: Table ABCD.USER_HIST has User_Id (Varchar 10) and T_STM_UPD (Timestamp) columns.
Need an index like this : CREATE INDEX ABCD.USER_HISTORY ON ABCD.USER_HIST (USER_ID,DATE(T_STMP_UPD));
The reason for creating the above index is the following query .
SELECT * FROM ABCD.USER_HIST WHERE USER_ID= 'KXXB123' AND DATE(T_STMP_UPD) = CURRENT_DATE - 1 DAYS ORDER BY T_STMP_UPD DESC;
Any suggestions are welcome.
Thanks
Kranthi