Hi Lynn,
Just to understand, Could you please explain how the query works? Especially the part
(SELECT 1) dt1(n)
CROSS APPLY (SELECT COUNT(*) FROM dbo.Customers) dt2(q1)
CROSS APPLY (SELECT COUNT(*) FROM dbo.Input) dt3(q2);
What does (SELECT 1) dt1(n) means?
And how it uses all these variables dt1, dt2, dt3, q1, q2 and n? Dont they need any declaration.
Thanks in advance.