Viewing 15 posts - 526 through 540 (of 1,229 total)
Used as a function:
CREATE FUNCTION [dbo].[DelimitedSplit8K_CTE]
--===== Define I/O parameters
(@pString VARCHAR(8000), @pDelimiter CHAR(1))
RETURNS TABLE WITH SCHEMABINDING AS
RETURN
WITH Splitter AS (
SELECT...
March 23, 2012 at 2:49 pm
Here's one way of limiting the rowcount:
DECLARE @pString VARCHAR(8000), @pDelimiter CHAR(1)
SET @pString = 'one,TWO,THREE,FOUR,five,six,seven,eight,nine,ten,eleven,twelve,thirteen,fourteen,fifteen,sixteen,seventeen,eighteen,nineteen,twenty,twenty one,twenty two,twenty three,twenty four'
SET @pDelimiter = ','
SELECT
ItemNumber = CAST(0 AS BIGINT),
Item = LEFT(@pString, CHARINDEX(@pDelimiter,@pString+@pDelimiter,0)-1)...
March 23, 2012 at 2:29 pm
Debbie Edwards (2/7/2012)
I was hoping to not have to create additional csv files, I was hoping to keep everything as simple as possible by having them...
February 7, 2012 at 4:04 am
Have you tried playing with HTML body format messages? The flexibility it offers is a real eye opener:
-- make some data to play with:
SET NOCOUNT ON
DROP TABLE #Table1
CREATE TABLE #Table1...
February 6, 2012 at 1:06 pm
pwalter83 (2/6/2012)
ChrisM@home (2/6/2012)
pwalter83 (2/6/2012)
I need to use the split function to display values separated by comma(,). However, the problem I am facing is that the values itself are separated by...
February 6, 2012 at 7:05 am
pwalter83 (2/6/2012)
I need to use the split function to display values separated by comma(,). However, the problem I am facing is that the values itself are separated by space. For...
February 6, 2012 at 6:40 am
This is something of a long shot based on observation. There are two key changes.
UPDATE c SET
MATCH_FLAGS = CASE WHEN c.MATCH_FLAGS&1 = 1 THEN 4 ELSE c.MATCH_FLAGS +...
February 1, 2012 at 12:27 pm
Cadavre (2/1/2012)
WHERE date_received >= DATEADD(MONTH, DATEDIFF(MONTH, 0, GETDATE()) - 1, 0) ANDdate_received < DATEADD(MONTH, DATEDIFF(MONTH, 0, GETDATE()), 0)
Too quick for me today mate...
February 1, 2012 at 9:16 am
A reasonably good way to do this is to calculate a start and end date for your range. Here's a little standard date arithmetic to give you some ideas:
SELECT DATEADD(month,DATEDIFF(month,0,GETDATE())+1,-1)...
February 1, 2012 at 9:14 am
Hi Michael
Something is still bugging me about this project. Of these three tables...
StagingViews.ClaQuestionView
Staging.ClaCases
AF_Fraud_Jan_24
...which if any are created or altered by the exercise "find individuals (NameID) where a motor claim was...
February 1, 2012 at 8:21 am
Hi Michael
I've got a hunch that this problem could be resolved with something simple like so:
SELECT af.*, d.*
FROM AF_Fraud_Jan_24 af
INNER JOIN (
SELECT cc.NameID, cqv.ClaCaseID, cqv.Answer, cqv.QuestionDate
FROM StagingViews.ClaQuestionView cqv
INNER JOIN Staging.ClaCases...
February 1, 2012 at 3:32 am
SQLRNNR (1/26/2012)
ChrisM@home (1/26/2012)
SQLRNNR (1/26/2012)
ChrisM@home (1/26/2012)
SQL Kiwi (1/26/2012)
January 26, 2012 at 12:44 pm
SQLRNNR (1/26/2012)
ChrisM@home (1/26/2012)
SQL Kiwi (1/26/2012)
January 26, 2012 at 11:59 am
SQL Kiwi (1/26/2012)
January 26, 2012 at 11:47 am
Artoo22 (1/26/2012)
fahey.jonathan (1/25/2012)
January 26, 2012 at 2:33 am
Viewing 15 posts - 526 through 540 (of 1,229 total)