Viewing 15 posts - 7,036 through 7,050 (of 8,731 total)
2 hints for you:
1. Aggregate functions don't consider NULL values.
2. Take a look at NULLIF function.
EDIT: You don't need to cast your data, it will only get you wrong results....
February 5, 2014 at 8:38 am
Hi, Welcome to the forums.
I'll be glad to help you, but it would take me a while to prepare the data to be able to test any solution. Could you...
February 5, 2014 at 8:22 am
Hi Alan,
You need to change your table to a subquery involving only the grouping columns and the ones to be aggregated.
SELECT [1] AS q1, [2] AS q2, [3] AS q3,...
February 4, 2014 at 5:51 pm
As I told you, a WHERE clause will do the trick. And you can add values (or change to a full numbers table/view/function) to have even more months.
DECLARE @val int...
February 4, 2014 at 3:31 pm
Why would you choose 5 & 6 instead of 1 & 2?
To make it dynamic, add a WHERE clause to the Months CTE and you might want to add more...
February 4, 2014 at 1:41 pm
I don't know your complete requirements, but shouldn't you be showing a lot less rows (just one per cart)? If you just want to list the Carts with Maintenance, you...
February 4, 2014 at 1:39 pm
I'll leave 2 other options, just for the fun.
UPDATE t2
SET found = 'OK'
FROM #Table2 t2
WHERE EXISTS( SELECT...
February 4, 2014 at 9:07 am
You have some errors on the way you want to generate the query. You can't combine the assignment of variables with the return of results and you need to write...
February 4, 2014 at 8:52 am
I'm a little confused by this:
I'll leave the name a secret for now, but look for a little fun in your mailbox this Wedneday, February 5, 2014.
A few years ago...
February 4, 2014 at 8:31 am
ajay.contact (1/31/2014)
Thanks a lot Luis/SSCrazy. Your solution worked like magic :w00t:
I hope not, because you shouldn't know how magic works and you need to fully understand how the posted solutions...
January 31, 2014 at 5:29 pm
I wouldn't expect technical questions from the CTO. I believe that it should be more on:
Why would they hire you?
Personal experiences on problems and how were they solved.
What kind of...
January 31, 2014 at 5:26 pm
Maybe something as simple as changing the NULL to a value as '9999-01-01'. It would be better if you do this in your table to avoid functions and possibly use...
January 31, 2014 at 4:29 pm
I'll leave you here 2 options based on solutions presented on a different thread for a ProperCase function found in here: http://www.sqlservercentral.com/Forums/Topic1531616-392-1.aspx
The first solution uses the DelimitedSplit8K which is described...
January 31, 2014 at 4:17 pm
I'm not sure if it would work, so keep a backup of your packages.
As SSIS packages are basically XML files, you could use Notepad++ (or another text editor that allows...
January 31, 2014 at 3:53 pm
cmcfarland 51322 (1/31/2014)
Thanks for taking a look at this!I get no errors, but no returns, either.
That's probably because you might have NULLS in [Company Name].
Here are the most common options:
--Using...
January 31, 2014 at 2:26 pm
Viewing 15 posts - 7,036 through 7,050 (of 8,731 total)