Viewing 15 posts - 6,076 through 6,090 (of 7,191 total)
Have a look in Books Online for DATEADD.
March 17, 2008 at 5:16 am
Presentation is usually a job for the application layer. However, if you want to do it with T-SQL, you can do something like this:
DECLARE @List varchar(1000)
SET @List = ''
SELECT...
March 17, 2008 at 5:06 am
Yes, NOWAIT isn't valid syntax for SQL Server in this context. And the TOP 100 PERCENT is only useful if you're ordering the result set - which you shouldn't...
March 14, 2008 at 9:53 am
Yann
What Robert is saying is that you should examine the graphical execution plan. If anything in the plan appears in red, this is where you need to start tuning...
March 14, 2008 at 9:04 am
But you said that wasn't the actual code you're running. Why does Piotr's example not work for you?
John
March 14, 2008 at 8:42 am
Yes, something like this:
SELECT SPECIFIC_SCHEMA + '.' + SPECIFIC_NAME AS ProcName, LAST_ALTERED
FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_TYPE = 'PROCEDURE'
AND LAST_ALTERED > GETDATE() - 7
John
March 14, 2008 at 8:28 am
Debbie
A wrapper procedure is just a procedure that calls other procedures. Now, what is it exactly that you're trying to do?
John
March 14, 2008 at 7:50 am
Is your server involved in replication or log shipping? If not, it sounds as if you have 10GB of uncommitted transaction(s). Try using DBCC OPENTRAN and sp_who2 to...
March 14, 2008 at 7:46 am
Do you have users using the database at midnight? If not, it's probably a scheduled job that's doing it. If you do have users on at that time,...
March 14, 2008 at 7:32 am
rbarryyoung (3/14/2008)[hr
You have to double them up. It is confusing at first, but you get used to it soon enough.
Or you can do what somebody suggested on one of...
March 14, 2008 at 7:15 am
OK, how about putting the result set of the function into a temp table:
SELECT dbo.fn_Find_Security_Details(Sedol_Number, AsAt)
INTO #MyTempTable
FROM #tmpUsed
and then joining to that instead?
John
March 14, 2008 at 6:45 am
Jamie
Will this work?
...FROM #tmpUsed t INNER JOIN (
SELECT Bid, Price_date, sedol_number
FROM dbo.fn_Find_Security_Details(Sedol_Number, AsAt)
) f
ON f.sedol_number=t.sedol_number
John
March 14, 2008 at 5:54 am
Jeff Moden (3/13/2008)
Of course, if the table exists and you're only selecting one row, why do you need a view to begin with?
As I mentioned, that's an extreme example. ...
March 13, 2008 at 9:55 am
Ah. Please take care to post in the correct forum. There are no CTEs in SQL Server 2000. Would you be able to use a subquery instead?...
March 13, 2008 at 7:59 am
Viewing 15 posts - 6,076 through 6,090 (of 7,191 total)