Focal Point
[CLOSED] Concatenating date and alpha string together

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/519103702

August 12, 2009, 12:57 PM
BDAVIS
[CLOSED] Concatenating date and alpha string together
Is this possible? I'm trying to return a list of names in sr_persnl and then add a date (in datetime format, but I don't need the time) they were assigned at the end.
(SQL)
SELECT (...)
SUBSTR(mis_get_personnel_func(r.service_number),1,500) sr_persnl,
mis_get_status_date_func(r.service_number,'AS') sr_date_assigned
FROM (...)


(define)
SR_DATE_ASSIGNED/YYMD = HDATE(SR_DATE_ASSIGNED, 'YYMD');
SR_DATE_ASSGN/A20 = SR_DATE_ASSIGNED;
SMITH/A400 = SR_DATE_ASSGN||('-'|SR_PERSNL);

(table)
PRINT
(...)
SMITH AS ' SMITH' IN +1
(...)

But I get:
0 ERROR AT OR NEAR LINE 325 IN PROCEDURE sr001j FOCEXEC *
(FOC282) RESULT OF EXPRESSION IS NOT COMPATIBLE WITH THE FORMAT OF FIELD:
SR_DATE_ASSGN
0 ERROR AT OR NEAR LINE 326 IN PROCEDURE sr001j FOCEXEC *
(FOC258) FIELDNAME OR COMPUTATIONAL ELEMENT NOT RECOGNIZED: SR_DATE_ASSGN
0 ERROR AT OR NEAR LINE 351 IN PROCEDURE sr001j FOCEXEC *
(FOC003) THE FIELDNAME IS NOT RECOGNIZED: SMITH
BYPASSING TO END OF COMMAND
(FOC009) INCOMPLETE REQUEST STATEMENT

Perhaps I've been fooling with it too long. Ideas?

This message has been edited. Last edited by: Kerry,


WebFOCUS 7.6.3 | Solaris 10 | Excel, PDF
August 12, 2009, 01:04 PM
GinnyJakes
To concatenate, both items must be alphanumeric. You can use function HCNVRT or a series of EDIT commands to convert your date to alpha.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
August 12, 2009, 03:49 PM
GamP
quote:
SR_DATE_ASSIGNED/YYMD = HDATE(SR_DATE_ASSIGNED, 'YYMD');
SR_DATE_ASSGN/A20 = SR_DATE_ASSIGNED;

should read
SR_DATE_ASSIGNED/YYMD = HDATE(SR_DATE_ASSIGNED, 'YYMD');
SR_DATE_ASSGN/A8YYMD = SR_DATE_ASSIGNED;


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988