Viewing 15 posts - 3,151 through 3,165 (of 10,144 total)
CREATE TABLE #Sample (t_id int, w_id int, t_code CHAR(5), w_name VARCHAR(25))
INSERT INTO #Sample (t_id, w_id, t_code, w_name)
SELECT 35855, 3680, 'A1100', 'EVM Method Project' UNION ALL
SELECT 35856, 3680, 'A1110', 'EVM Method...
July 11, 2014 at 3:16 am
DROP TABLE #Sample
CREATE TABLE #Sample (Startdate DATE, [start-time] INT, [end-time] INT, duration INT)
INSERT INTO #Sample (Startdate, [start-time], [end-time], duration) VALUES ('20140710', 820, 1000, 20)
-- How it's done
SELECT *
FROM #Sample s
CROSS...
July 10, 2014 at 9:05 am
Koen Verbeeck (7/10/2014)
Jack Corbett (7/10/2014)
Koen Verbeeck (7/10/2014)
I saw Jeff was endorsed 9 times for...
July 10, 2014 at 7:45 am
The query was failing because one or more columns in the original multi-statement table-valued function were non-nullable. It's unlikely that changing the nullability of those columns would change the plan.
July 10, 2014 at 7:38 am
cstrati (7/10/2014)
select mvID, title, rating, length ,studiofrom MovieInfo
where rating not like 'R'
and
where (length > 90)
Seems to be a problem with line 5
Thanks in Advance.
There may be a problem with line...
July 10, 2014 at 5:36 am
-- You might want to configure that function as an iTVF for performance:
CREATE FUNCTION [dbo].[iTVF_CallbackService_ufn_GetCallerData]
(
@nCaller_NoArgINTEGER,
@cCallerLangArgCHAR(1)
)
RETURNS TABLE
AS
RETURN (
SELECT
[Caller_No]= @nCaller_NoArg,
[Clientname]= RTRIM(LTRIM(c.First_Name)) + ' ' + RTRIM(LTRIM(c.Last_Name)),
[ClientLanguage]= CASE
WHEN @cCallerLangArg = 'F'
THEN...
July 10, 2014 at 5:17 am
schleep (7/9/2014)
July 10, 2014 at 4:41 am
SELECT
MyString,
x.p1, y.p2, z.p3,
LeftBitty = LEFT(MyString,NULLIF(z.p3,0)-1)
FROM (VALUES ('ek/df/cv/'), ('ek/df/cv/f'), ('ek/df/cvf')) d (MyString)
CROSS APPLY (SELECT p1 = CHARINDEX('/',MyString,0)) x
CROSS APPLY (SELECT p2 = CHARINDEX('/',MyString,p1+1)) y
CROSS APPLY (SELECT p3 =...
July 10, 2014 at 2:05 am
Joe Contreras-290946 (7/9/2014)
I created an ETL process using C# (SSIS was not available) and ran into some issues with one of the fields.
I have a [description] that contains...
July 9, 2014 at 9:40 am
Grant Fritchey (7/9/2014)
Where does my data come from?Well the mommy data and the daddy data loved each other very much so....
Bwahaaaa! I was so tempted to post "Haven't you had...
July 9, 2014 at 7:04 am
INSERT INTO TargetTable (<<columnlist>>)
SELECT <<columnlist>>
FROM SourceTable
July 9, 2014 at 6:23 am
Treat it as any other table source: SELECT * FROM dbo.MyFunction(param, param)
Having said that, the rCTE string splitter is known to perform poorly against other methods. You can read about...
July 9, 2014 at 5:55 am
This should get you started:
;WITH SequencedData AS (
SELECT *, rn = ROW_NUMBER() OVER(PARTITION BY order_id ORDER BY [Priority])
FROM #set_dates
)
SELECT
[Split3_ID], [CU_ID], [order_id], [st_date], [sku], [Priority],
o.[Delay],
[CourseDate] = CASE WHEN o.rn =...
July 8, 2014 at 6:09 am
prabhu.st (7/8/2014)
--Estimated Subtree Cost = 0.0034222 (to calculate 21.6 rows)
select Field from #tempunpivot UNPIVOT (Field for ColumnName IN...
July 8, 2014 at 5:41 am
SELECT NewColumn
FROM #test t
CROSS APPLY (VALUES (id_respondent), (projid), (gfkroid)) d (NewColumn)
July 8, 2014 at 4:00 am
Viewing 15 posts - 3,151 through 3,165 (of 10,144 total)