Viewing 15 posts - 481 through 495 (of 902 total)
sgmunson (12/11/2012)
December 11, 2012 at 9:46 am
First and foremost is DBMail set up and does the SQLAgent service account have rights to send mails?
You should be able to check in the SQLAgent logs look for...
December 11, 2012 at 9:41 am
Looking at the way you've done the paging it you should be able to simplify the whole thing, firstly the substring could be the cause, have you looked at other...
December 11, 2012 at 1:31 am
Thanks for the table scripts though you dont need the FK as we dont have the table it references.
You original query wont work as this sums all rows, regardless of...
December 10, 2012 at 12:49 am
Welcome to SSC.
The Query is fairly straight forward, all you're doing is grouping and summing the data up by the Month so this should work.
Select
DateName(Month,OrderDate) [Month]
,Sum(Apples) as TotalApples
,Sum(Oranges) as...
December 8, 2012 at 4:16 am
Using a Tally Table would improve this code significantly, also you have to be careful about using the fucntion datepart(dw,a_date) as in some cases Sunday isnt always represented by 1,...
December 3, 2012 at 3:51 am
It depends on the organisation size, number of employees, the support structure in place, but I would imagine some/all of these will be a part of the role
Morning Routine
Checking Overnight...
November 30, 2012 at 1:53 am
There is also another way to change the way the Excel drivers 'determine' the datatype of a column and that is to use the IMEX=1 switch on the connections string.
I...
November 30, 2012 at 12:45 am
That shouldnt make a difference, but you can wrap a CAST or Convert around both levels in the union to force it into a varchar.
how wide is the column likely...
November 26, 2012 at 5:53 am
What Data type is the Description column, nvarchar() or varchar()?
November 26, 2012 at 5:06 am
Sorry I forgot to add the Level into the second Select statement which should read like this
Select Dim_CostCentre_SK
,Dim_CostCentre_ParentBK
,Dim_CostCentre_Desc
,0 Level
from Dim_CostCentre
Where Dim_CostCentre_ParentBK IS NULL
/*
Get all the children
*/
UNION ALL
SELECT d.Dim_CostCentre_SK
,d.Dim_CostCentre_ParentBK
,p.DimcostCentre_Desc+'\'+d.Dim_CostCentre_Desc
,p.Level+1 Level
FROM...
November 26, 2012 at 3:20 am
Sorry I think I missunderstood, you want to generate the data from a Parent Child hierarchy, in order to populate that table, correct?
there are a few questions, as there are...
November 26, 2012 at 2:18 am
I'm not sure you can do it in a CTE, can to you provide some sample data for us to play around with.
November 26, 2012 at 1:10 am
you need to set the Text Qualifier in the File connection editor, then make sure that it has been set on the columns you need under the Advanced Tab, which...
November 23, 2012 at 6:31 am
I agree Eugene, I dont remember punch cards but I do remember 8 inch floppy disks, if you had a 386 as a desktop you were lucky, and servers ran...
November 23, 2012 at 6:11 am
Viewing 15 posts - 481 through 495 (of 902 total)