Viewing 15 posts - 3,016 through 3,030 (of 4,080 total)
Using old school technique, you could use subqueries instead of CTEs to do it in steps. I'm sorry that WITH gives you a problem, because I find CTEs...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
April 20, 2009 at 7:17 am
Sorry if the entire thread was too intimidating, but the FOR XML technique doesn't require that you know the values in advance.
Here it is applied 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
April 20, 2009 at 7:11 am
Although I have no preference, aren't they using VB with SSIS?
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
April 20, 2009 at 6:56 am
I have nothing against synonyms, but wouldn't the use of synonyms require distinct sets of code for each synonym accessed? When pulling numbers from similar tables in...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
April 20, 2009 at 6:53 am
Just a suggestion, for readability purposes, use CTEs to build up what you want step-by-step. You don't take a performance hit because the optimizer treats it as a...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
April 20, 2009 at 6:45 am
I have no doubt they could create additional functions within SQL. Look at what can be done with FOR XML concatenation now. If they chose, they could...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
April 19, 2009 at 2:37 pm
Our head DBA and I both agree that using dynamic SQL to pull together information from multiple databases is a good way to go. In our...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
April 19, 2009 at 2:27 pm
Just out of curiousity...
Why are you looking for a solution like
@X = ( @X + ABS(@X) ) / 2
instead of
@X = CASE WHEN @X <0 THEN 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
April 19, 2009 at 2:15 pm
A thought here for some of you who might have the ear of the powers that be at Microsoft. Given that CLR is demonstrably faster at some things...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
April 19, 2009 at 2:07 pm
This is a fairly common question. Various solutions are posted here:
http://www.sqlservercentral.com/Forums/Topic695359-338-1.aspx#bm695486
Take a look at the FOR XML solution near the front, and please let me know if 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
April 18, 2009 at 2:09 pm
Ask and ye shall receive...
No promises about efficiency, but it's not a case statement either 😉
-- for any given function or expresion "@X"
declare @x int
set @x = -5
while @x...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
April 17, 2009 at 3:54 pm
I wonder if he will be able to put 2 and 2 together
Hey Lynn,
I told your friend a long time ago that his problem is 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
April 17, 2009 at 3:26 pm
secretly part of The Thread's plans to take over the world
GUS!!!! :w00t:
Shhhhhhhhhhhhhhhhhhhh!!!!! Next thing you'll be blabbing about the secret handshake. 😛
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
April 17, 2009 at 3:06 pm
THREAD be not proud, though some have called thee
Mighty and dreadfull, for, thou art not so...
OLD?
Old age hath yet his honour and his toil;
The Thread closes all: but something ere...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
April 17, 2009 at 9:58 am
Good point, Jack. Although we do formatting at the db level for consistency, if you just stored phone numbers as integers, you would trim fat out of...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
April 17, 2009 at 7:43 am
Viewing 15 posts - 3,016 through 3,030 (of 4,080 total)