09-18-2013 06:20 AM
In a query I need to join the Year & Month of a field but with ampersand (&) used for variables what would be the correct way to present the following:
CREATE TABLE RESULTS AS SELECT DPD_BUCKET, YEAR(MIS_MONTH) & MONTH(MIS_MONTH) AS DATA_MONTH FROM FAQ;
09-18-2013 02:53 PM
Please see if you can provide me a complete syntax to use a custom format of my own in this regard in PROC SQL as you have recommended, i.e. YYMMxw. format as the concatenation via the catx function leads to month lower than 10 to be represented in single digits. In other words how to represent a month like Jan, Feb as 2012_01, 2012_02 instead of 2012_1, 2012_2 respectively.
09-18-2013 07:57 AM
Year and month will have & as connector.
CREATE TABLE RESULTS AS SELECT DPD_BUCKET, catx('&',YEAR(MIS_MONTH), MONTH(MIS_MONTH) ) AS DATA_MONTH FROM FAQ;
Need further help from the community? Please ask a new question.