Viewing 15 posts - 1,696 through 1,710 (of 2,007 total)
WayneS (3/11/2011)
March 11, 2011 at 9:13 am
Simple pivot example.
DECLARE @table AS TABLE(Id INT, Product CHAR(5), TT INT, Week CHAR(2))
INSERT INTO @table
SELECT 1, 'Test1', 75, '1'
UNION ALL SELECT 2, 'Test2', 20, '1'
UNION ALL SELECT 3, 'Test1', 60,...
March 11, 2011 at 4:56 am
=Format(Fields!elapsedtime.Value, "HH:mm:ss")
Note - This will only work if the elapsed time never goes above 23:59:59. If it does, there's another way that's a little more complicated.
March 11, 2011 at 4:33 am
Hmmm, strange. Never come across this issue before.
This would solve the problem: -
=floor((Fields!response_time.Value / 3600)) & ":" & floor(((Fields!response_time.Value Mod 3600) / 60)) & ":" & floor(((Fields!response_time.Value Mod 3600) Mod...
March 11, 2011 at 4:20 am
I'm unable to reproduce that result - can you let me know what the response_time.value was please?
March 11, 2011 at 3:48 am
I'd use a derived column, using something like this: -
REVERSE(SUBSTRING(REVERSE(@[User::varFileName]),1,FINDSTRING(REVERSE(@[User::varFileName]),"_",1) - 1))
That'll include the extension, so add another substring in there to remove it.
After that, I'd have a conditional split...
March 10, 2011 at 3:53 am
Not tested, but how about a case statement?
--Dummy table and data
DECLARE @Samp AS TABLE (
token INT, tokenorder SMALLINT, startdate SMALLDATETIME,
enddate SMALLDATETIME, proc1 VARCHAR(6), proc2 VARCHAR(6),
proc3 VARCHAR(6), proc4 VARCHAR(6), proc5 VARCHAR(6),
proc6...
March 4, 2011 at 5:21 am
This doesn't add anything to ColdCoffee's answer. I just saw the other empty thread before I spotted this one so wrote out my solution (pretty much identical to ColdCoffee)
--Create Dummy...
March 3, 2011 at 7:11 am
karen.blake (3/2/2011)
March 2, 2011 at 4:46 am
SELECT a.Id, b.total
From TableA a
LEFT OUTER JOIN (SELECT b.Id, SUM(b.quantity) AS total FROM TableB b GROUP BY b.Id) b ON a.ID = b.Id
where b.total>100
February 23, 2011 at 10:12 am
Michael Valentine Jones (2/23/2011)
skcadavre (2/23/2011)
"What do your parents do for a living?"I just remember thinking - what in god's name has that got to do with anything?
It's good to have...
February 23, 2011 at 10:06 am
Not looked at your "IF" statement at the end of the proc, but the SELECT statements can be concatenated using CASE statements.
CREATE PROCEDURE [dbo].[Sp_ee_a_disabled]
@inT1 VARCHAR(200), @inT2 VARCHAR(200), @inT3 VARCHAR(200)
AS
...
February 23, 2011 at 6:23 am
"What do your parents do for a living?"
I just remember thinking - what in god's name has that got to do with anything?
February 23, 2011 at 6:11 am
Would this sort of thing be useful?
SELECT Isnull(sp.name, sw.name), sm.object_id
FROM sys.sql_modules sm
LEFT OUTER JOIN sys.procedures sp ON sp.object_id = sm.object_id
LEFT OUTER JOIN sys.VIEWS sw ON sw.object_id = sm.object_id
WHERE (definition LIKE...
February 8, 2011 at 7:55 am
Viewing 15 posts - 1,696 through 1,710 (of 2,007 total)