Viewing 15 posts - 7,576 through 7,590 (of 8,416 total)
#temp3 is a local temporary table - it is private to the session that created it.
Dynamic SQL runs in a separate context, so it cannot see the private table. ...
June 26, 2009 at 7:06 am
I really wouldn't lose too much sleep over this - the original problem was fairly serious in principle, but the chances of hitting it on a typical production system were...
June 26, 2009 at 6:55 am
Example data and expected output would be cool - especially if you write it all in SQL.
Otherwise, depending on the data and requirements, you might like to look at AVG...
June 26, 2009 at 6:46 am
Usually, one would use a combination of the following SQL features:
LEFT or SUBSTRING
CHARINDEX or PATINDEX
REPLACE or STUFF
See String Functions
Paul
June 26, 2009 at 6:39 am
Paul White (6/24/2009)
Fastest possible implementation:
I take it all back 🙁
This is faster:
[font="Courier New"]PRINT 1
PRINT 2
PRINT 3
...
PRINT 100[/font]
You can have that one for your book for free!
Paul
edit: stupid font tags :angry:
June 26, 2009 at 6:32 am
An indexed view isn't going to work for you if you absolutely have to include 'imprecise' data types in your query. 🙁
There's not even a half-decent hack or workaround that...
June 26, 2009 at 6:28 am
No worries. Nice easy question!
I suppose I should say that there's really no benefit in omitting SET NOCOUNT from the top of your procedures - unless you happen to...
June 26, 2009 at 6:23 am
GilaMonster (6/26/2009)
The start and end offset will let you calculate from the sql text which statement is which.
I find it unfortunate that the view designers decided to use -1 for...
June 26, 2009 at 6:18 am
yaya1899 (6/26/2009)
Thanks for enlighten me, I din't notice by adding the PRIMARY KEY will make so much difference.:-D
Absolutely. Otherwise, SQL Server has to scan the table to find the...
June 26, 2009 at 6:07 am
I saw this before.
It didn't meet my personal 'bar' for time and effort required. Maybe if you had provided real table definitions, indexes, sample data creation, and so on...?...
June 26, 2009 at 5:41 am
This is the Connect item I remember: http://connectbeta.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=386810
It includes full details and a repro.
Any particular reason why you would not apply Service Pack 1?
Paul
June 26, 2009 at 5:34 am
Florian Reischl (6/26/2009)
Paul White (6/26/2009)
(Before we go on to set-based, let's tidy the RBAR a bit)Can we go on now? 😎
Heh. Just trying to be fair about it. 😀
June 26, 2009 at 5:19 am
Hey 8kb,
Don't forget to include a SET DATEFIRST statement if you use DATEPART(WEEKDAY... to find weekends.
Not everyone gives the same numbers to the same days of the week.
(You can...
June 26, 2009 at 5:16 am
Is the named instance set to listen on named pipes? (See Network Configuration in Configuration Manager)
And the SQL Server Browser service is running?
Paul
June 26, 2009 at 5:02 am
Viewing 15 posts - 7,576 through 7,590 (of 8,416 total)