Hi All,
I have a problem with getting concatenated data in a query using “QueryResults” as the data source to combine queries that use two different DBs.
In detail:
First query from DB wich includes data about searches:
SELECT T_USER_SEARCH_HISTORY.id, T_USER_SEARCH_HISTORY.user_id, T_USER_SEARCH_HISTORY.created_date, WEEK(T_USER_SEARCH_HISTORY.created_date,3) KW, YEAR(T_USER_SEARCH_HISTORY.created_date) Year, CAST(CONCAT(YEAR(T_USER_SEARCH_HISTORY.created_date),"_",WEEK(T_USER_SEARCH_HISTORY.created_date,3)) as CHAR) CWYear
- In the query combining the two data sources later I want to get CWYear
Second query gets data from a DB with Company information (nothing special here I guess)
Third query (the query using Query Results):
Select t1.id, t1.user_id, t1.created_date, t1.KW, t2.carrier, t1.Year, t1.CWYear
From query_572902 t1
Inner join cached_query_570346 t2
on t1.user_id = t2.id;
- Here I simply want to get the data about the CWYear from my first query, but the results in this column are all zeros.
Any help how this could be solved would be much appreciated!