Viewing 15 posts - 4,456 through 4,470 (of 8,731 total)
Please don't use a recursive CTE to generate a calendar table as it's only a way of hidden RBAR. You can read more about this on this article: http://www.sqlservercentral.com/articles/T-SQL/74118/
As an...
August 10, 2015 at 10:22 am
The simplest way was to use the original query as a CTE or derived table and then join it to the calendar table.
WITH cteQuery AS(
SELECT RTRIM(data.dbo.CLI.LNAME)...
August 10, 2015 at 10:05 am
Isn't that a connection property?
What exactly do you want to know? Does this answer your question?
August 10, 2015 at 9:34 am
You need an outer join with a calendar table.
Something like this:
SELECT *
FROM CalendarTable c
LEFT
JOIN SomeTable s ON c.calDate = s.SomeDate
WHERE c.calDate >= @StartDate
AND c.calDate < @EndDate + 1
August 10, 2015 at 9:28 am
In this case, you don't need to know the types from the columns as they won't matter. The important part is to know the type the function returns.
August 10, 2015 at 9:11 am
This should work as explained in the original post. It doesn't return the same results because you don't have digits in your AllowedCharacters table.
CREATE FUNCTION dbo.StripNonAllowedChars
(
@OriginalText Varchar(8000)
)
RETURNS...
August 10, 2015 at 8:07 am
Lowell (8/10/2015)
Luis Cazares (8/10/2015)
Any reason not use LIKE?
yes, there's a reason!
i built this a while ago , and i have a bunch of variations of it for specific purtposes.
but i...
August 10, 2015 at 7:52 am
Any reason not use LIKE?
ALTER FUNCTION dbo.StripNonAlphaNumeric_itvf
(
@OriginalText Varchar(8000)
)
RETURNS TABLE
AS
RETURN
(
WITH tally (N) as
(SELECT TOP 10000 row_number() OVER (ORDER BY sc1.id)
FROM Master.dbo.SysColumns sc1
CROSS JOIN Master.dbo.SysColumns...
August 10, 2015 at 7:30 am
crookj (8/10/2015)
Ed Wagner (8/10/2015)
djj (8/10/2015)
Ed Wagner (8/10/2015)
BL0B_EATER (8/10/2015)
Stuart Davies (8/10/2015)
TomThomson (8/9/2015)
SQLRNNR (8/8/2015)
Ed Wagner (8/8/2015)
Eirikur Eiriksson (8/8/2015)
SQLRNNR (8/7/2015)
Mood🙂 Smiley
Happy
Shiny
reflective
pensive
Deep
Wide
Load
Reload
Download
Virus
August 10, 2015 at 7:18 am
After a good weekend of rest and a morning coffee, this is what I came out with. It's reducing the conditions by splitting the lines into separate rows before the...
August 10, 2015 at 7:15 am
Your data doesn't help that much. It allows basic tests and I can't be sure that all conditions are met.
You'll have to test this code to be sure that it...
August 9, 2015 at 6:37 pm
nadersam (8/9/2015)
Please bare with me, i am new with tally tables programming, i was reading about it during last few days.
In our example you specified the number of rows...
August 9, 2015 at 5:37 pm
Sean Lange (8/7/2015)
50k post update - just over 50 more to go. :w00t:
5 more to get to page 1K for me.
August 7, 2015 at 12:59 pm
Jeff Moden (8/7/2015)
SQLRNNR (8/7/2015)
jasona.work (8/7/2015)
August 7, 2015 at 12:38 pm
Revenant (8/7/2015)
whereisSQL? (8/7/2015)
SQLRNNR (8/7/2015)
BonaseraCorleone
Boss
Hugo
August 7, 2015 at 12:08 pm
Viewing 15 posts - 4,456 through 4,470 (of 8,731 total)