query syntax

Vicki 46 Reputation points
2022-10-04T20:23:57.17+00:00

Hi,

How can I have the results from #1 to display all in one row like #2 -Thanks

247478-image.png

Developer technologies | Transact-SQL
Developer technologies | Transact-SQL
A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
0 comments No comments
{count} votes

Answer accepted by question author
  1. Naomi Nosonovsky 8,881 Reputation points
    2022-10-04T20:30:21.113+00:00

    Try

    ;with cte1 as (first query),  
    cte2 as (second query)  
      
    select cte1.*, cte2.* from cte1, cte2 -- cross join OK for single rows  
    
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.