Viewing 15 posts - 1,996 through 2,010 (of 2,883 total)
But from my limited testing, I think that having multiple stored procedures (one for each possible scenario and one "master" one that is used to call one of the others)...
April 17, 2020 at 9:15 pm
As a thought, rather than handling this in SQL, could you handle this in your import or export tool? Instead of having multiple "footer" fields, could you concat them before...
April 17, 2020 at 8:44 pm
Ok, so to sort it how you want, I think this should work:
SELECT CATEGORY_DESCRIPTION
,JANUARY
,FEBRUARY
,MARCH
,APRIL
,MAY
,JUNE
,JULY
,AUGUST
,SEPTEMBER
,OCTOBER
,NOVEMBER
,DECEMBER
,AVERAGE
,STD_DEV
,STDDEV_1_POS
,STDDEV_2,POS
,STDDEV_3_POS
,STDDEV_1_NEG
,STDDEV_2_NEG
,STDDEV_3_NEG
FROM (
SELECT PARENT
,CATEGORY_DESCRIPTION AS CATEGORY_DESCRIPTION
,SUM(JANUARY) AS JANUARY
,SUM(FEBRUARY) AS FEBRUARY
,SUM(MARCH) AS MARCH
,SUM(APRIL) AS APRIL
,SUM(MAY) AS...
April 17, 2020 at 7:26 pm
Well, the order is likely going to be unreliable anyway as you have no order by clause in there. If you need it in a specific order, you will need...
April 17, 2020 at 6:51 pm
Is the vendor tool dropping the indexes OR are you dropping them?
If it is you, why not disable them and then rebuild rather than dropping and recreating?
Do you need the...
April 17, 2020 at 6:44 pm
I agree with frederico_fonseca, this should work. I see no reason why that stored procedure wouldn't work unless you need it to create all of the indexes dynamically in which...
April 17, 2020 at 5:10 pm
What error are you getting in your backups? That error message will be the best way to tell what is wrong...
April 17, 2020 at 5:04 pm
scdecade - will that not fail still if columns don't exist (ie footnote3 may not exist)? I just did a test on that and, like my solution, SQL sees "footnote3"...
April 17, 2020 at 4:19 pm
As a thought... if you disable the writing to destination step of the SSIS package, do you get errors still?
I am wondering if MAYBE the problem is on the destination...
April 17, 2020 at 4:10 pm
I am not 100% sure if IF statements would handle that better or not. Been a while since I tried it. Just tried it and it does not work. So...
April 17, 2020 at 4:03 pm
My bad... didn't see the attachment. Sorry about that.
Looking through it now and will let you know if I see something to do what you need.
EDIT - your attached script...
April 17, 2020 at 3:33 pm
Could it be a problem not with the valid dates, but with the NULLS?
As a quick test for that you could make 2 files, one that has a value in...
April 17, 2020 at 2:54 pm
Just my 2 cents, but devs shouldn't be running queries against live, espeically if they are going to take down live by doing so.
April 17, 2020 at 2:50 pm
What about if you break that out into IF statements instead?
April 17, 2020 at 2:19 pm
Could you post some sample code?
My expectation is that you are going to need a case statement in there, but would like some sample data to work with and would...
April 17, 2020 at 2:14 pm
Viewing 15 posts - 1,996 through 2,010 (of 2,883 total)