Thank you all for your answers in attempting each I have learned much and have adjusted the code to get the necessary records.
Declare @pOrderid as int
set @pOrderid = 1263636
IF OBJECT_ID('tempdb..#N_Orders_tmp1') IS NOT NULL drop table #N_Orders_tmp1
IF...
Is there a better way to do this Query?
I have a large database of invoices. These invoices are not grouped by the customer and all of them have 4 fields of phone numbers. The phone numbers for a particular customer are not always the same but they will always have at least 1 phone number in...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.