Focal Point
creation of quarter field in time dimension

This topic can be found at:
http://forums.informationbuilders.com/eve/forums/a/tpc/f/1381057331/m/5361058331

May 03, 2005, 06:35 AM
<Renuka>
creation of quarter field in time dimension
creation of quarter field in time dimension.

source database = MS Access
field name = shippeddate; format = HYYMDs

Now i want to create a table which contains quarter1 field in MS SQL Server.

please let me know what is the procedure to create a quarter1 field and also format of the field in sql server.

Thanks,
Renuka
May 03, 2005, 02:32 PM
Francis Mariani
First convert the HYYMDs column to a YYMD column (DATE_Z in my example). Then you can isolate any of the date components.

DEFINE FILE EMPDATA
DATE_X/A8YYMD = HIREDATE;
DATETIME/HYYMDS = HINPUT(8, DATE_X, 8, 'HYYMDS');
-*
DATE_Z/YYMD = HDATE(DATETIME, 'YYMD');
END
-RUN

TABLE FILE EMPDATA
SUM
DATETIME
DATE_X
DATE_Z
DATE_Z/Q
DATE_Z/QYY
DATE_Z/YYM
DATE_Z/D
DATE_Z/MTYY
BY DATE_X NOPRINT
END
-RUN