Viewing 15 posts - 1,201 through 1,215 (of 4,080 total)
Jeff Moden (2/16/2011)
WayneS (2/15/2011)
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
February 17, 2011 at 6:27 am
My first thought was I would like to see the difference in the execution plans. If I get time to do some tests I'll post...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
February 16, 2011 at 3:57 pm
First, you have to identify the set of userIDs which exist more than once.
Try this:
SELECT a.id,a.title,uao.userid
FROM user_artist_owned uao
INNER JOIN artists a on a.id=uao.objectid
where userid in (
SELECT userid
FROM...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
February 15, 2011 at 3:01 pm
You should test them side by side to be sure, but in my experience the cross-tab runs just a hair faster on average.
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
February 11, 2011 at 5:34 pm
Is this an SQL question?
That is not a sarcastic remark. What are you running? What do you mean you "closed the page"? ...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
February 11, 2011 at 5:32 pm
It might be easier to follow if we could see the actual code, but....
Remember that a CTE does not produce a temporary table. It is just a symbolic...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
February 11, 2011 at 3:31 pm
In the absence of a preexisting table, you can generate a sequential list of hours very simply by means of a tally table.
;with hoursTbl as (
select dateadd(hour,N-1,cast('Feb 10 2011' as...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
February 11, 2011 at 2:45 pm
QA is where some developers send their code to see if it works correctly or not. Often they do this without verifying that it works in their development...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
February 11, 2011 at 7:30 am
Just out of curiosity, how do you use ROW_NUMBER() at all without using OVER? I'll encourage you to read up on ROW_NUMBER(), RANK(), and the other windowed functions...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
January 13, 2011 at 3:29 pm
If you are using the code shown to insert into another table, you are only going to get one "duplicate" at a time. To insert all...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
January 11, 2011 at 11:53 am
akhandels (1/7/2011)
Temporary data has only two columns -ID - int.
CODE - varchar(40).
CODE is used in join condition.
If you index the table variable on [Code], and if the table to...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
January 7, 2011 at 12:30 pm
I am trying to find out what customer has the highest balance outstanding as well as the longest period outstanding.
Mike, respectfully, you need to work on stating your question more...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
January 7, 2011 at 11:56 am
More information would help. What columns are you going to index on? What are your joins going to look like to your permanent tables?...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
January 7, 2011 at 11:46 am
LutzM (12/30/2010)
The Dixie Flatline (12/30/2010)
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
January 4, 2011 at 6:32 am
Good for you, Robert, and thanks for letting us know that you have a solution now. Good luck to you in the coming year.
One comment on your...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
December 30, 2010 at 3:43 pm
Viewing 15 posts - 1,201 through 1,215 (of 4,080 total)