Viewing 15 posts - 2,536 through 2,550 (of 4,080 total)
Having reread the last part of your last post: Yes, you did, Elliott. 🙂
I saw your opening line about not really suggesting it and thought your entire...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
August 25, 2009 at 10:05 am
declare @yourdate datetime
set @yourdate = GETDATE()
select @yourdate
-- here is the syntax for the most efficient execution (avoids converting to char and back)
select DATEADD(DAY,DATEDIFF(day,0,@yourdate),0)
--...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
August 25, 2009 at 10:01 am
This seems a little clunky, but I think it does what you want.
declare @array table (value int primary key)
insert into @array
select 1 union all
select 2 union all
select 4 union...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
August 25, 2009 at 9:52 am
No problem. Good luck to you.
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
August 25, 2009 at 9:30 am
I think I must be misunderstanding your last post. The "hardcoded" names were just used to create some sample data. Any query that results in three...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
August 25, 2009 at 9:15 am
You're welcome Regina. To understand what is happening, I suggest you walk through it one step at a time to see the outputs from the CTEs, what...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
August 25, 2009 at 8:33 am
This was another fun problem, and a great morning warm-up. The trick here was to use ROW_NUMBER() to provide a sequence number so that you could have unique...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
August 25, 2009 at 8:09 am
Most of the credit goes to Jeff. He taught me everything I know about Tally 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
August 25, 2009 at 7:46 am
Do you understand why the ORDER BY compels the execution of a full table scan? The only way I think you could improve on that would be the...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
August 25, 2009 at 7:42 am
Quite likely.... and in the end, she solves her own problem. 😛
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
August 25, 2009 at 7:40 am
Regina, do you just require the names of the contacts, or do you need email address, phone numbers, etc?
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
August 24, 2009 at 4:08 pm
In a word: Doh! :w00t:
Man, I am really off my game.
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
August 24, 2009 at 4:02 pm
We're on the same server right? I was thinking you'd just create the view in the SAME db as the tables, and grant access only to that...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
August 24, 2009 at 3:55 pm
In a word: Yes.
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
August 24, 2009 at 11:12 am
Jeff:
I have a question for you. I originally tried to do the whole problem without the working table, but I kept getting an error that an invalid...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
August 24, 2009 at 11:11 am
Viewing 15 posts - 2,536 through 2,550 (of 4,080 total)