Hi Guys,
I have a bit of SQL which stores information into temp tables however I’m sure there is a better way of do this. Any help or suggestions would be grateful.
SELECT *
INTO #EMAIL
FROM KeyCareClean
WHERE NOT EXISTS
(select *
from STUDENT
where...
Just to add to this i've just broken up the store procedure to on run the first part
Declare @Year_Local varchar(4) = '2010', @Quarter_Local varchar(9)= null, @Month_Local varchar(3)=null, @Silo_Local varchar(2) = null
Select Person_name, MaginusAccount, Account_Name, 'Person Target...
Hi,
Im having issues with the performance of this store procedure. does anyone have any ideas how i might improve it?
Declare @Year_Local varchar(4), @Quarter_Local varchar(9), @Month_Local varchar(3), @Silo_Local varchar(2)
--VisitedTargetedSiloAccounts
Select Person_name...
Can any one suggest how i might improve the performance of this store procedure? It seem to take a while to run and im sure there is a better way of writing it...
Declare
@Year_Local varchar(4),
@Quarter_Local varchar(9),
@Month_Local varchar(3),
@Person_name_Local varchar(100)
Select...
Anyone got any ideas on how i might get the above working.
I want the bottome where clause to be a parameter so the user can type either visited or not visited
Cheers
I've written this query, however im not sure it the best way to write it. Could someone please help?
Thanks in advance
Select t1.*
From
(Select Silo,Arrow_Silo_Name, AccountName,Account_Name
From Sales_Matrix inner join Arrow_Silo_Description
on Sales_Matrix.Silo =...
Hi Guys, I have this query below: It works fine however i'd like to use
Where t2.NumberOFMeeting = 'Not visited' in the where clause instead of:
where t2.NumberOFMeeting is null
any help would be appreciated
Declare @Year varchar(4) = 2010, @Quarter varchar(9) = null, @Month varchar(3) =...
I've created a store procedure using this information however when i try and run the procedure in the form of EXEC Storeprocedure '2010'. It states it requires the @Quarter parameter
Any ideas?
ALTER PROCEDURE [dbo].[Report_1_Visits_by_Targeted_and_Un-Targeted]
-- Add the parameters for the...
This is what im try to get to, is this the best way of writting this?
Select t1.AccountName, IsNull(t2.NumberOFMeeting,0) as NumberOFMeeting
From
(Select AccountName
From Sales_Matrix
Group By AccountName)t1 left outer join (Select MaginusAccount, ISNULL(Count(AccountName),0) As...
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.