A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
Hi @Krlos Stone ,
I would like to know how I can order my queries because I cannot use "ORDER BY" and instead the "GROUP BY" fulfills its function but without order.
Ordering is only guaranteed if you use ORDER BY
Maybe this thread can help you, you can order by on a case, or use a table variable or temporary table with an identity column, feed in your values and join to that
When of the 3 queries it is greater than 2000 rows, it takes a long time to do the "FULL JOIN" with respect to whether table1.time = table2.time.
Consider indexing first, check out this thread, or create to tiny tables and join them together instead, the db engine has no choice but to scan each table looking for the joins
-------------
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.