Viewing 15 posts - 5,701 through 5,715 (of 8,731 total)
I just wanted to play around a little bit and this might be a good option to clean the data using an inline table-valued function.
The function:
CREATE FUNCTION dbo.CleanNames( @Name varchar(8000))
RETURNS...
October 9, 2014 at 8:52 am
Would you mind trying with a different version of the function?
ALTER FUNCTION [dbo].[ProperCase](@String [varchar](4000))
RETURNS [varchar](4000) WITH EXECUTE AS CALLER
AS
BEGIN
----------------------------------------------------------------------------------------------------
DECLARE @Position INT
;
--===== Update the first character no matter what...
October 8, 2014 at 7:24 pm
Could you post the function? Have you installed any updates/SP?
October 8, 2014 at 6:50 pm
The problem is with your pivot alias. You need to use square brackets if you want to use a reserved word or, even better, change the alias into something less...
October 8, 2014 at 5:44 pm
Would Contained databases be what you're looking for?
October 8, 2014 at 4:28 pm
MMartin1 (10/8/2014)
Either the column is a char/varchar or will have to be cast at select time...
October 8, 2014 at 3:35 pm
Assuming ExpiryDate is a date/time data type column, I would use the following.
ExpiryDate >= DATEADD(dd, DATEDIFF( dd, 0, getdate()), 0)
It's basically the same as
ExpiryDate >= cast(getdate() as date)
But the...
October 8, 2014 at 1:42 pm
You're right, I just wanted to point out that there's no guarantee of the order of the results.
October 8, 2014 at 1:08 pm
a4apple (10/8/2014)
October 8, 2014 at 12:44 pm
DATEDIFF will avoid any usage of indexes on ExpiryDate column.
DATEPART(dd, date) will return wrong results because you're missing month and year.
That cast might allow using indexes if the column is...
October 8, 2014 at 12:35 pm
No need for a while loop, you just need to use REPLICATE() function.
SELECT REPLICATE('_', [LEVEL]) + NAME
FROM @Tree
October 8, 2014 at 12:31 pm
ScottPletcher (10/8/2014)
October 8, 2014 at 11:50 am
That's weird, I'm sure that integers would be implicitly converted into strings as shown on the examples from BOL.
October 8, 2014 at 10:00 am
rohit.kumar.barik (10/8/2014)
I faced such issue in my work.
I used two row_number() function
1st row_number() with partition by docno and date1
2nd row_number() with partition by docno.
But i could not order them...
October 8, 2014 at 9:46 am
Viewing 15 posts - 5,701 through 5,715 (of 8,731 total)