Viewing 15 posts - 1,906 through 1,920 (of 3,957 total)
Hmmm... All those ORs in the ON clauses looks pretty messy. Here's an alternate way but I haven't tested to see if it performs better:
DECLARE @T1 TABLE (comp_name...
February 26, 2013 at 6:02 pm
ChrisM@Work (2/26/2013)
mister.magoo (2/26/2013)
ChrisM@Work (2/26/2013)
dwain.c (2/26/2013)
ChrisM@Work (2/26/2013)
peter-757102 (2/26/2013)
February 26, 2013 at 5:12 pm
ChrisM@Work (2/26/2013)
peter-757102 (2/26/2013)
February 26, 2013 at 4:32 am
Ahhhh! Now I've got it without the fudge factor.
DECLARE @TimeAdd VARCHAR(20) = '41:41:41.041'
SELECT GETDATE()
,DATEADD(hour
,ABS(LEFT(@TimeAdd, 2))
...
February 23, 2013 at 1:01 am
Strike that last post. The issue seems to be here:
SELECT GETDATE(), DATEDIFF(millisecond, 0, CAST('00:'+RIGHT('41:41:41.041', 9) AS TIME))
Where DATEDIFF should be returning 2501041 instead of 2501040.
February 23, 2013 at 12:36 am
Jeff Moden (2/22/2013)
dwain.c (2/21/2013)
February 23, 2013 at 12:25 am
ajames 36824 (2/22/2013)
Jeff Moden (2/22/2013)
ajames 36824 (2/22/2013)
You ROCK! 😀Do you understand how and why it works?
Well it looks like it says that for each question in the QuestionID column, return...
February 22, 2013 at 7:18 pm
Clarity is a beautiful thing.
SELECT ClientID, DOV, Form
,[Alcohol1-001]=MAX(CASE QuestionID WHEN 'Alcohol1-001' THEN CAST(Response AS VARCHAR(3)) ELSE '' END )
,[Alcohol1-002]=MAX(CASE QuestionID WHEN 'Alcohol2-002'...
February 22, 2013 at 9:10 am
mister.magoo (2/22/2013)
ChrisM@Work (2/22/2013)
L' Eomot Inversé (2/22/2013)
mister.magoo (2/22/2013)
Sorry if I have made a mistake, but I think this...
February 22, 2013 at 9:02 am
Have you tried the solution I suggested?
I'm thinking it will do what you need.
I hope I didn't confuse you by putting Table2 into the CTE.
February 22, 2013 at 3:33 am
I like Sean's solution and got to wondering whether a subquery would work as well:
SELECT t.*, isnull((
select top 1 ItemCode as ItemCode
...
February 22, 2013 at 3:25 am
ChrisM@Work (2/22/2013)
DROP TABLE #Table1
SELECT
*
INTO #Table1
FROM (
SELECT Column1 = 'microsoft outlook 2007,microsoft 2007 outlook,microsoft out look 2007,microsoft 2007 office,microsoft...
February 22, 2013 at 1:33 am
montecarlo2079 (2/21/2013)
When the select statement runs, it omits about 39 icns in my list. is there something in the join that could be counting these records out?
Is it possible...
February 22, 2013 at 12:41 am
I think I get the question but not sure, so here's a shot in the dark:
DECLARE @Table1 TABLE (software_name_raw VARCHAR(100))
INSERT INTO @Table1
SELECT 'microsoft outlook 2007'
UNION ALL SELECT 'microsoft 2007 outlook'
UNION...
February 22, 2013 at 12:28 am
Viewing 15 posts - 1,906 through 1,920 (of 3,957 total)