Viewing 15 posts - 2,386 through 2,400 (of 3,957 total)
I have two suggestions:
1. Firstly to get quick help you need to post your data with DDL in a readily consumable form. You can consult this article for the...
December 13, 2012 at 6:24 pm
Probably the reason no one has volunteered to help after 6 days is that you didn't provide your sample data in readily consumable form.
I'm feeling charitable today so I will...
December 13, 2012 at 5:47 pm
I'm not sure I really get what you're after but perhaps a Quirky Update will do the job:
CREATE TABLE #SalesByEmployeeCategory
(Category ...
December 13, 2012 at 5:23 pm
It is most important to learn by doing.
Read the forums and get ideas. Test your ideas, i.e., construct working queries.
Then see if you can think of variants that optimize...
December 13, 2012 at 4:55 pm
Jeff Moden (12/13/2012)
CELKO (12/12/2012)
SQL is a data base language and it was never meant to reporting [font="Arial Black"]or complex calculations.[/font] Do not cut wood with a screw driver.
Heh... yeah......
December 13, 2012 at 5:34 am
andrew.mckee (12/12/2012)
December 13, 2012 at 2:44 am
The short answer is probably yes.
But to demonstrate, you'd need to post a full, parseable XML string.
December 12, 2012 at 11:40 pm
I like to advise people to avoid self-JOINs whenever possible because I've always found them to be performance dogs across large row sets. Woof!
Not sure this is faster than...
December 12, 2012 at 5:47 pm
CELKO (12/12/2012)
It is not a query; it is a cursor because it has an ORDER BY.
Odd. I always thought an ORDER BY was a sort, rather than a cursor...
December 12, 2012 at 5:26 pm
CELKO (12/12/2012)
Elephants do not fall out of the sky in RDBMS.
Obviously you've never lived in Thailand. Here they do.
December 12, 2012 at 5:20 pm
mickyT (12/12/2012)
After reading your article (nice work), I couldn't help myself and added a Geography column to the airports table.
This allows the distance to be calculated using the Geography...
December 12, 2012 at 5:19 pm
Lowell (12/12/2012)
why not call him a witch and call for burning him at the stake?I
Speaking from experience, I have seen some SQL code where the developer literally should have been...
December 12, 2012 at 5:17 pm
Abu Dina (12/12/2012)
montse 22199 (12/12/2012)
Thanks a lot!!! it worked fine!!! :-):-D;-)Credits go to dwain to be fair lol I used his method it's better than my original solution.
Good luck!
Thanks for...
December 12, 2012 at 5:15 pm
CELKO (12/11/2012)
Oh, good SQL programmers do no use the proprietary PIVOT kludge.
I don't use UNPIVOT either. I use CROSS APPLY VALUES (http://www.sqlservercentral.com/articles/CROSS+APPLY+VALUES+UNPIVOT/91234/) instead. Probably not an ISO standard...
December 11, 2012 at 6:57 pm
Here's another way:
DECLARE @MyString VARCHAR(8000) =
'30;38469|31;38470|32;38471|33;38472|34;38473|35;38474|36;38475|37;38476|38;38477|'
SELECT col1=MAX(CASE ItemNumber%4 WHEN 1 THEN Item END)
,col2=MAX(CASE ItemNumber%4 WHEN 3 THEN Item END)
FROM PatternSplitCM(@MyString, '[0-9]')
WHERE...
December 11, 2012 at 6:51 pm
Viewing 15 posts - 2,386 through 2,400 (of 3,957 total)