This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
I have two tables with date columns (String) like this:
Table 1 has dates for every day of every month and some other columns.
Table 2 has only the first day of every month and a value column.
When I join the two tables, this is what I get:
date1(ddmmyy) date2 value
110119 NULL NULL
120119 NULL NULL
130119 NULL NULL
010219 010219 8
I want to fill data in "Value" column for the 1st of every month into all the NULL fields.
Example: If Value = 8 for Feb 1st in Table 2, then Feb 1st to Feb 28th the Value column has 8 in the joined table. Similarly, if Value = 10 for Jan 1st Table 2, then Jan 1 to Jan 31 Value is 10 in the joined table and so on...
I know how to replace NULL values in date2 column with the corresponding dates from date1, but I've not been able to figure out how to replace NULL values in the Value column like in the above example.