Forum Discussion
Query Creation
Hi all,
I'm struggling to create a query,
Consider I have two different Queries with results
15 2019-10-21 00:00:00 1636 66
15 2019-10-21 00:00:00 1636 66
and
15 2019-10-21 00:00:00 1636 66
15 2019-10-21 00:00:00 1636 66
15 2019-10-21 00:00:00 1636 66
I want to get like
15 2019-10-21 00:00:00 1636 66 15 2019-10-21 00:00:00 1636 66
15 2019-10-21 00:00:00 1636 66 15 2019-10-21 00:00:00 1636 66
null null null null null null 15 2019-10-21 00:00:00 1636 66
anyone have idea
- LainRobertsonSilver Contributor
Hi, Arshad.
There's not enough information here to work with. All we can do is guess at what you are trying to do.
If your views are producing a single column and that column contains the kind of data you've shown in your examples, then no, you cannot do that, as there's no relationship between the two tables. It's just a full dump of one view in the first column and then a full dump of the second view in the second column.
If your views are producing multiple columns and at least one of those columns is identical in both views, then you have a means for joining the tables at which point what you're trying to do becomes possible.
It's quite possible that you could also achieve what you want by ignoring the two existing views and creating a new view that works directly with the underlying table(s), but you've included no information about them at all, so this is just a hypothetical statement on my part.
If you can provide the view definitions and/or some sample data from both views (assuming there's more than one column), we might be able to better help you. But for now, there's very little we can tell you.
But if it is just a single column being returned by each view, then - as mentioned above - the answer is no, it's not possible using the views. In this case, you would have to look at the underlying tables to see if they offer a way to solve your issue, and if you would like our help with this, then we'll need more detail on the structure of those tables and some example data or else we cannot help.
Cheers,
Lain