Viewing 15 posts - 21,076 through 21,090 (of 22,184 total)
Most of the time, cursors just flat out run too slow. Rewriting the procedures to avoid the use of cursors is usually the best bet. Other than that, I'm not...
February 4, 2008 at 4:43 am
This white paper from Microsoft is one of the best sources for this information.
February 4, 2008 at 4:38 am
Itzik is the greatest.
It sounds as if you're doing some sort of data migration. If you can, you should look into, in some way, turning this into a bulk load....
February 4, 2008 at 4:35 am
The long answer is: it depends.
Let's assume that the 8 column table is supposed to be retained in it's entirety and that you're supposed to create that, load it, and...
February 4, 2008 at 4:28 am
As you've already seen, no they're not both the same. Yes, the number of physical reads is the same, but you'll find that this procedure recompiles, a lot, probably every...
February 4, 2008 at 4:21 am
How about using a CTE within a UNION query. Something like this:
WITH MyCTE AS
(SELECT SalesOrderId
,row_number() over (order by TotalDue DESC) AS TotalRank
,TotalDue
FROM Sales.SalesOrderHeader)
SELECT TOP 5 *
FROM MyCTE
UNION
SELECT *
FROM MyCTE
WHERE SalesOrderId...
February 4, 2008 at 4:13 am
This seriously sounds like a highly questionable approach.
However, if you really want to do it, you need to use dynamic SQL:
DECLARE @mySQL nvarchar(max)
SET @mySQL = 'SELECT ' + @Column...
February 1, 2008 at 12:31 pm
But if you were using SMO as a code generation utility, it wouldn't matter that you had to use the name would it? I mean if we assume that you...
February 1, 2008 at 12:26 pm
I've done it both ways. The one recommendation I can make is to make this consistent with the rest of the system. If the system is using artificial and invisible...
February 1, 2008 at 11:48 am
I'm sorry. I really don't know at this point. We use this all the time and it works just fine.
February 1, 2008 at 10:12 am
Dynamic management views related to transactions are what you're looking for. But, just so you know, that's not the final answer. That's where to look in the documentation to get...
February 1, 2008 at 9:56 am
How about that fact that FoxPro is no longer in the development path (although they're supporting it through 2015)?
Sorry, couldn't help it. I really don't know that much about FoxPro.
February 1, 2008 at 9:29 am
A CTE is very local. In fact, it's only available to the SQL query that immediately follows it, although it can be used multiple times within that query. so you...
February 1, 2008 at 9:25 am
Posting homework is bad enough. Cross-posting homework is getting a bit over the line. See my response on the other thread.
February 1, 2008 at 9:22 am
Clearly, obviously homework. You even posted the question numbers.
For help of this kind, you have to show what you tried that didn't work rather than have any of us do...
February 1, 2008 at 9:21 am
Viewing 15 posts - 21,076 through 21,090 (of 22,184 total)