Viewing 15 posts - 1,081 through 1,095 (of 1,439 total)
July 16, 2009 at 4:14 am
Not sure how well this will perform, but should give correct results
WITH CTE AS (
SELECT log_ticket,
ROW_NUMBER() OVER(PARTITION BY log_ticket ORDER BY log_event) -
...
July 15, 2009 at 7:58 am
bhavster27 (7/14/2009)
Mark (7/14/2009)
SELECT R.nref.value('@ExpressionRef', 'INT') AS ExpressionRef,
R.nref.value('@ErrorResult', 'VARCHAR(50)')...
July 14, 2009 at 9:26 am
Try changing
SELECT R.nref.value('@ExpressionRef', 'INT') AS ExpressionRef,
R.nref.value('@ErrorResult', 'VARCHAR(50)') AS ErrorResult,
...
July 14, 2009 at 8:48 am
Use FOR XML PATH
SELECT Name AS "@SubscriptionName",
DeliveryMethod AS "@DeliveryMethod",
(SELECT
...
July 13, 2009 at 2:43 am
Lamprey13 (7/10/2009)
July 13, 2009 at 2:04 am
Something like this then
WITH CTE AS (
SELECT pa_contactidname,asmemberof,ballotcommitteename,
ROW_NUMBER() OVER(PARTITION BY pa_contactidname,asmemberof ORDER BY ballotcommitteename) AS rn
FROM user_table)
SELECT pa_contactidname,asmemberof,
...
July 9, 2009 at 2:18 pm
Try changing
a.ballotcommitteename b. ballotcommitteename
to
a.ballotcommitteename < b. ballotcommitteename
July 9, 2009 at 1:24 pm
Possible issues with Google Chrome?
July 8, 2009 at 4:45 am
Russell.Taylor (7/8/2009)
Mark thank you for your response but the query you supplied does not work on syntax,
What syntax error are you getting?
July 8, 2009 at 4:06 am
SELECT a.ID,
MAX(a.Quantity) AS Quantity1,
MAX(b.Quantity) AS Quantity2
FROM MyTable a
LEFT OUTER JOIN MyTable b ON b.ID=a.ID AND b.Quantity<a.Quantity
GROUP...
July 7, 2009 at 10:23 am
If you are using SQL Server 2005, you can use XQuery instead of OPENXML
DECLARE @x XML
SET @x=' ...your XML here'
SELECT Packet.value('1+count(for $a in . return $a/../*[. << $a])','INT') AS packet_id,
...
July 3, 2009 at 5:16 am
SELECT teacher,
SUM(CASE WHEN Year=2006 THEN 1 ELSE 0 END) AS [2006],
SUM(CASE WHEN Year=2007 THEN 1 ELSE...
July 2, 2009 at 6:35 am
Try this
SELECT a.id1,
a.DOS AS StartDate,
MIN(c.DOS) AS EndDate,
DATEDIFF(d, a.DOS, MIN(c.DOS))+1...
July 2, 2009 at 3:12 am
Use sp_executesql with OUTPUT variables
CREATE PROCEDURE [dbo].[sp_GetOverallStatus] @statusid int, @rowcount int OUTPUT
AS
DECLARE
@tablename varchar(200),
@query varchar(1000)
BEGIN
SET NOCOUNT ON;
SELECT @tablename = (SELECT Tablename FROM...
July 1, 2009 at 8:17 am
Viewing 15 posts - 1,081 through 1,095 (of 1,439 total)