Viewing 15 posts - 3,886 through 3,900 (of 4,080 total)
In Block 1, I notice you didn't specify a length for @sql. Run this and see what happens as a result.
-----------------------------------------------------------------------------------
declare @sql nvarchar
set @sql = 'Deck the halls...
__________________________________________________
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 23, 2008 at 8:57 am
Sorry I blew over that this was out of Adventureworks.
Merry Christmas to all. May 2009 be a better year for everyone.
__________________________________________________
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 23, 2008 at 8:47 am
If it's not too late, you might also consider renaming that column. It's just fewer headaches in the long run to avoid keywords as column names.
__________________________________________________
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 22, 2008 at 9:22 pm
If you REALLY want the grid in a separate table you could always do two queries with a UNION ALL, but why bother?
The problem is that SQL doesn't currently allow...
__________________________________________________
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 22, 2008 at 1:29 pm
I don't think you need two tables. You can store all the polygons in a single table. If we're just talking 105 rows here, that's a trivial amount....
__________________________________________________
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 19, 2008 at 9:26 pm
Couple of questions:
1. Have you created spatial indexes for the two tables yet?
2. What do you mean by "lay over"? SQL Server can tell...
__________________________________________________
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 19, 2008 at 6:41 pm
I edited my previous post. My approach to the solution is detailed there. You can search this site using the keywords "parse" and "concatenate" for...
__________________________________________________
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 19, 2008 at 3:45 pm
I mean, will F1 ever have '123.1, 126.5, 135.4' and you want it to be "the same" as '135.4, 126.5, 123.1' for grouping purposes.
I don't have time...
__________________________________________________
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 19, 2008 at 12:55 pm
Will F1 ever have more than two numbers in it?
__________________________________________________
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 18, 2008 at 4:01 pm
You're welcome. Merry Christmas, Jean-François.
__________________________________________________
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 18, 2008 at 1:32 pm
Try this:
declare @input decimal(9,4)
set @input = -25.77
select case when @input >0 then '+' else '' end -- gives you a plus...
__________________________________________________
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 18, 2008 at 12:32 pm
Neither my approach nor PIVOT is able to create the column names for you. You have to identify all of them in advance, which means you would have 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
December 17, 2008 at 2:44 pm
I'm not sure how to approach this with PIVOT because you aren't grouping on EAID, you are actually using it to divide into two sets of columns. ...
__________________________________________________
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 17, 2008 at 2:30 pm
You're too quick for me today, Seth. One important thing to remember is that although charindex and substring work normally with text columns, the LEN function doesn't....
__________________________________________________
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 17, 2008 at 1:54 pm
I've worked with a dates table to find "missed" days, and also used CTES to generate sets of dates on the fly using a tally table to increment some...
__________________________________________________
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 17, 2008 at 1:32 pm
Viewing 15 posts - 3,886 through 3,900 (of 4,080 total)