Viewing 15 posts - 46 through 60 (of 178 total)
Hi there, you need a cross-tab query
SELECT
Tone,
SUM(CASE WHEN IsIncomming=1 THEN Duration ELSE 0 END) AS [IsIncomming = 1],
...
August 8, 2009 at 12:09 pm
You'll need to add a WITH ROLLUP to a GROUP BY
///Edit - sorry, excuse me, Little Sir Echo
August 5, 2009 at 10:41 am
Hi, you need to create a stored procedure, see http://msdn.microsoft.com/en-us/library/aa258259(SQL.80).aspx
August 5, 2009 at 7:46 am
Did you look at my suggestion of full text catalog at all?
August 5, 2009 at 3:21 am
Heh he, you're quite right :blush:, guess he'd need to normalise as per your solution, take a distinct on the resultant item table, then concatenate with XML FOR PATH method...
August 3, 2009 at 4:59 pm
I would also recommend that you go with Lynn's solution - this kind of un-normalised view should only really be used for display. In the interests of completeness, if...
August 3, 2009 at 4:46 pm
Hi,
I just tested a SSIS import of a Foxpro free table, with integer and logical fields, both nullable. I added a few rows of data leaving a few fields...
August 3, 2009 at 4:40 pm
It ain't just less code, it's faster too. And yeah, internally SQL server does have to go row-by-row, but that's faster than an explicit while loop.
Have a...
August 2, 2009 at 3:19 pm
Just out of interest, how was this being done in the Foxpro app? Using a while loop, indexseek and replace?
August 2, 2009 at 2:23 pm
Hi,
you can do this with following:
UPDATE TableB
SET Value2 = A.Value1
FROM TableA A --Using 'A' as alias for TableA
WHERE
ID2 = A.ID1
AND...
August 2, 2009 at 2:12 pm
Cool, well do you fancy posting ddls, data, query and output for the TableA TableB RBAR you refer to above?
Ah, go on!
August 2, 2009 at 2:40 am
Yeah,
definitely plan carefully on this one, learn to avoid RBAR (almost every time) and you'll be totally astonished by performance gain.
Even if you don't avoid bad habits problems may be...
August 1, 2009 at 3:41 pm
Jan Van der Eecken (8/1/2009)
Jack Corbett (8/1/2009)
Jeff Moden (8/1/2009)
Allister Reid (8/1/2009)
I thought someone might try to unpick what he was doing to try to help with the bigger picture...
I...
August 1, 2009 at 2:01 pm
Viewing 15 posts - 46 through 60 (of 178 total)