I have a sql table with multiple fields including (but not limited to the following): member_id, visit_date (in datetime format eg: 2016-01-01), visit_yr_qtr (as string, eg: 2016_Q1), purchase_item (ID number), and item_price (in US dollars). I would like to extract these fields, but also include year_month (2016- January or 2016-01)as a new field in the output. This is what I
Tag: extract
SAS proc SQL: Extract number in front of the word ‘Month’ or ‘Months’
I want to extract a number from a string where it is directly followed by the word ‘Month’ or ‘Months’. The search should be case insensitive and the text to look in typically looks like No …