Viewing 15 posts - 16 through 30 (of 38 total)
These are actually views rather objects; which should not make any difference in the query execution as such. And since I have an access to the schema's should have...
June 16, 2011 at 12:49 pm
I am not sure this fits the bill, but check this link out and see if you can tweak things out.
http://www.scarydba.com/2010/10/18/powershell-is-really-easy-if-you-know-what-youre-doing/
June 10, 2011 at 8:53 am
Nice example; However this should not have had happened in the first place; and seems kind of weird. We upgraded the DB with a newer version of our build and...
June 10, 2011 at 8:47 am
Darn! I knew it wasn't that complicated, I have used XML 'n' number of times before as well to concatenate the columns. If only I would have stressed my self...
May 4, 2011 at 7:19 am
How would i get to Identify which columns have been got set to 1, ie. If I had to represent the column names with a comma seperated list ?The one...
May 3, 2011 at 3:41 pm
Great work! Thanks for the inputs . The article was very helpful to understand the implementation, however reverse engineering it was a bit difficult.
@andrew's solution worked like a...
May 3, 2011 at 7:37 am
Included the solution; You might wanna fiddle around it for different solution
But there is more fun in finding the solution as @seth pointed. Also make sure you check the...
April 1, 2011 at 9:15 am
Follow this article and it should be able to guide you.
http://www.sqlservercentral.com/articles/Best+Practices/61537/
January 24, 2011 at 9:54 am
Thanks Celko, It did work, I modified/tweaked your solution according my needs and it seems to be giving the correct output and since the stores are not going to be...
January 17, 2011 at 1:40 pm
Thanks for your inputs Celko;
However I want to tell you that this is not even a correct depiction of our DB and is just a crude scratch display of...
January 17, 2011 at 11:52 am
Was this so simple? It seems to do the work though
SELECT o.SToreID,a.Names, CASE WHEN a.Names = s.PrimaryName THEN 'Primary' ELSE 'Secondary' END AS Source
FROM #Occurence o
INNER JOIN #Store s
ON...
January 17, 2011 at 10:10 am
Since you have already Grouped them by dealer's;
You just had to add the Having clause to get the count > 3
SELECT DealerName
, COUNT(DealerName) AS DealerCount
FROM Dealer
GROUP BY DealerName
HAVING...
January 10, 2011 at 2:58 pm
That figures out to be one of the solution, but it is not much practical as of now, since we have multiple stores in the DB and reports would be...
January 6, 2011 at 10:26 am
If you had followed sean's advice you would have reached to a solution.
Anyways here it is; try to read what others are indicating , it might help
select
case
when (file like...
January 5, 2011 at 3:26 pm
Yes you are right; Different stores will have different vlaues configured in the DB; and hence different values for the column aliases. All combinations to the views could be included,...
January 5, 2011 at 12:55 pm
Viewing 15 posts - 16 through 30 (of 38 total)