Viewing 15 posts - 1 through 15 (of 27 total)
Thank you all for your great feedbacks.
In this article I tried to illuminate things I didn't find in any other article. In order to find common differences between Variable...
July 17, 2008 at 3:29 pm
You should understand what kind of data (and amount) you have in both servers (local and remote) when you're using linked server.
Sometimes you'd like to run the join on the...
March 7, 2008 at 5:47 am
The reason is tables are not ordered by definition and views are at the same category (RDBMS), if you need an ordered results you must specify "order by".
The solution of...
June 6, 2007 at 4:25 am
Part of upgrading to 2005 is rebuilding all indexes.
Try to analyze (dbcc showcontig or DMV) your indexes to verify this issue.
June 4, 2007 at 12:36 am
You can declare @Error as output and do something like that:
DECLARE @Error INT -- Output in procedure
SET @Error = 0
Begin Transaction
INSERT Table1 ...
Values ...
SET @Error = @@Error
If @Error <> 0
begin
GOTO...
October 6, 2006 at 4:03 pm
Can you add execution plan?
Are you running both from same source?
If you are running this procs on testing environment try to run sp_recompile / DBCC FREEPROCCACHE and let us know...
October 6, 2006 at 3:47 pm
Try this one:
SELECT *
FROM tableX
WHERE ISNUMERIC(Quantity) = 0
October 4, 2006 at 1:25 pm
I tried to calculate your function with:
SELECT @DayDiff = DATEDIFF(DAY,@startdate,@EndDate)
and then dividing by 7 (week days) and ceiling etc.
My code looks "cleaner" but when I checked performance it looks the...
October 4, 2006 at 1:18 pm
what is your table name? Seems that you wrote column name instead table name.
Are you sure you need the query above and not this one:
UPDATE providerlistforfirstq...
October 3, 2006 at 3:43 pm
You can use the results as derived table / join table within update statement
October 3, 2006 at 3:37 pm
One way to find this information is:
DBCC SHOWCONTIG (Table_Name) WITH TABLERESULTS
October 3, 2006 at 3:28 pm
This is another way to do it:
-- This code will be parameter in procedure
declare @top tinyint
set @top = 10
-- Declare variable
declare @sql NVARCHAR(4000)
-- This is your code
SET
October 3, 2006 at 3:19 pm
This code might help you:
-- Simulate data
SET NOCOUNT ON
CREATE TABLE #DUP (ID INT IDENTITY(1,1), BP INT, SEQ INT, TYPE INT)
INSERT #DUP VALUES (100 ,1 ,1 )
INSERT #DUP VALUES (100, 2,...
October 3, 2006 at 2:58 pm
You can find ObjId in the page header when running DBCC PAGE.
October 2, 2006 at 4:49 am
What about using function like that:
-----------------------------------------------------------
CREATE FUNCTION udf_ConvertLDAPToDatetime (@TextToConvert nvarchar(50))
RETURNS DATETIME
AS
BEGIN
DECLARE @RETURN_DATE DATETIME
DECLARE @DATE DATETIME
DECLARE @HOUR INT
DECLARE @MINUTE INT
DECLARE @SECOND INT
SET @DATE = CONVERT(DATETIME, SUBSTRING(@TextToConvert,1,8),121)
SET @HOUR = SUBSTRING(@TextToConvert,9,2)
SET @MINUTE =...
September 28, 2006 at 1:33 pm
Viewing 15 posts - 1 through 15 (of 27 total)