Viewing 15 posts - 76 through 90 (of 105 total)
That would have given it an outright depth of 10.
My example should technically have only a depth of 2.
Like this:
SELECT CASE WHEN 11 = 12 THEN ...
November 17, 2006 at 9:36 am
I'm aware of the error message but this isn't REALLY a case of nested case statements but one of a lot of conditions. I wonder what would happen if you...
November 17, 2006 at 8:56 am
You wouldn't get 12 columns.
Only 4 are selected:
Item_ID Year_ID Month_ID Quantity
I'm not sure what the new Item_ID is supposed to represent...
November 13, 2006 at 12:52 pm
At a casual glance, it seems like he is telling it to create 12 rows for every one row in the original table. The CASE statement would be telling it...
November 13, 2006 at 12:24 pm
ANY thoughts? I didn't post this earlier because it isn't a fully formed idea but it could be there is some kind of implicit conversion being attempted behind the scenes...
November 13, 2006 at 9:54 am
I'll take a shot in the dark here and guess [UserGuid].
(Which field identifies the user? Can it be the UniqueIdentifier?
If you look at all the other fields you can see...
November 10, 2006 at 8:12 am
Before that I was thinking along these lines:
declare @startdate datetime, @enddate datetime declare @dw_startdate int select @startdate = getdate() select @dw_startdate = ((datepart(dw, @startdate) + @@DATEFIRST -1)%7)+1 select @enddate = @startdate + ...
November 9, 2006 at 5:37 pm
After you posted your solution (pretty slick, btw) I tried to figure out on my own how you did it and arrived at a slightly messier version:
Sunday= 1, DaysToWednesday= 3,...
November 9, 2006 at 3:37 pm
If people get away from sulking over the whole NetFlix prize money thing, I'd be interested in hearing an answer to the original question. What kind of good offsite hosting...
November 9, 2006 at 9:08 am
Thanks.
I added a comma (and dollar sign. I know... I'm being provincial. ) remover to that function.
Getting rid of the unintuitiveness (is that a word?) was the whole point of...
November 7, 2006 at 4:05 am
YES!!!
This has got to be the most inefficient way of doing this EVER!!
(Because I could... for "sanity" I ignored the out of range...
November 6, 2006 at 5:26 pm
Though that still doesn't anticipate the stupidity that comes up in real life. There could still be situations where the string contains multiple periods, out of place commas, wandering negative...
November 6, 2006 at 9:18 am
Look into the sysobjects (type='U'), syscolumns and systypes tables in BOL or run a few queries and you'll get the hang of it.
There's also: select * from Information_Schema.Columns
November 3, 2006 at 1:32 pm
You can make a report manager by creating a set of tables with rows defining available reports, parameters (type, default value, allows null or not), permissions, etc... and another set...
November 3, 2006 at 11:48 am
Yes.
If you have that relationship (and enforce it) then that is what would happen. He was talking about the reverse, though, ensuring that you can't accidentally create a childless row...
October 26, 2006 at 8:42 am
Viewing 15 posts - 76 through 90 (of 105 total)