Viewing 15 posts - 5,731 through 5,745 (of 6,036 total)
REPLACE(Replace(OutputString, CHAR(13), ''), CHAR(10), '')
For everything else use double quotes.
December 5, 2005 at 5:51 pm
Guys, you just think wrong way.
NULL is not actually a value, it's ABSENCE OF VALUE.
It's designed to display the fact that there is nothing, and you must use it...
December 5, 2005 at 1:58 pm
And funny part that on multy-CPU server UDF sometimes is faster than set of built-in functions in SQL statement.
Check this out:
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=238981&p=3
December 4, 2005 at 5:06 pm
1st. fnTransferEntries must be a view.
2nd. This view must contain column TransferId and the statement "GROUP BY TransferId".
3rd. Use
......
INNER JOIN dbo.TransferEntries te on te.TransferId = T.TransferId
December 4, 2005 at 4:54 pm
Consider to take only last script from Jeff's post as an example.
All other ways will eliminate index on DateField and badly affect performance.
And "if an index is not present on...
December 4, 2005 at 3:51 pm
As another example try this function:
IF EXISTS (SELECT * FROM sysobjects WHERE name = N'DateOnly')
DROP FUNCTION DateOnly
GO
CREATE FUNCTION dbo.DateOnly
(@DT datetime)
RETURNS datetime
AS
BEGIN
RETURN convert(datetime, convert(int, @DT - 0.5))
END
GO
And compare performance of...
December 4, 2005 at 3:31 pm
You've taken one of "BIG NO"s - don't access tables within scalar UDF.
It creates hidden cursor.
Your sample will really affect performance. But it happens not because of UDF but because you apply...
December 4, 2005 at 3:25 pm
Forget about SQL.
Just give me an answer on simple question:
My Salary = My Wife's Salary: TRUE or FALSE?
My Salary My Wife's Salary: TRUE or FALSE?
One RIGHT answer for each...
December 2, 2005 at 12:10 pm
NULL mens "don't know".
For you my salary is NULL.
As well as salary of my wife.
Let @Salary1 = My Salary = NULL;
@Salary2 = My Wife's Salary =...
December 2, 2005 at 3:19 am
Assign NULL to corresponding parameter and column will not be used.
December 1, 2005 at 4:11 pm
What datatype they want to use for bitmask?
power(2, 79) exceeds bigint max value.
declare @two bigint
set @Two = 2
UPDATE Table
SET col01 = case when @bitmask&1 = 0 then col01 else...
December 1, 2005 at 3:59 pm
ALTER PROCEDURE [dbo].[usp_Proc1]
@col1 int,
@col2 int,
@col03 char(1),
@col08 int
AS
Select count(col6)
from TableA
Where col1 = @col1 and
col2 = @col2 and
(col3 = @Col03 or @col03 IS NULL) and
(col08...
December 1, 2005 at 3:36 pm
It's not an error. It says it's warning.
It means some of values in r.ClientNumber are NULL (they must be because of left join) and COUNT eliminates them when counting. It counts only...
December 1, 2005 at 2:53 pm
Viewing 15 posts - 5,731 through 5,745 (of 6,036 total)