Viewing 15 posts - 3,586 through 3,600 (of 4,087 total)
Kenneth Fisher-475792 (10/3/2011)
drew.allen (9/30/2011)
Kenneth Fisher-475792 (9/30/2011)
I'm looking for a query to take the following table
This is a report and you should be using a reporting tool to generate it. ...
October 3, 2011 at 9:45 am
Prasanthi Reddy (10/2/2011)
Hi,I have a table which contains on and off status of a meter. Feederstatus = 0 means On and feederstatus=1 means Off.
You do realize that this is exactly...
October 3, 2011 at 8:33 am
Kenneth Fisher-475792 (9/30/2011)
I'm looking for a query to take the following table
This is a report and you should be using a reporting tool to generate it. T-SQL is not...
September 30, 2011 at 12:46 pm
R.P.Rozema (9/30/2011)
September 30, 2011 at 11:58 am
If you use FOR XML PATH('') to create your SQL command string, it will create a single string rather than one per index, so you don't even need the loop....
September 30, 2011 at 11:53 am
If I were doing this, I would probably just store the XML document in your audit table. That way you have a record of EXACTLY what was sent to...
September 30, 2011 at 11:40 am
The problem with a UNION (ALL) is that you will have to scan the table twice. Here is an approach that only scans the table once.
SELECT [ID]
...
September 29, 2011 at 7:05 am
Variables can be set using either a SET statement or a SELECT statement. You need to use the SELECT statement version
declare @xml XML='';
declare @ChildPrtID nvarchar(100) = 'T12345';
;with XMLNAMESPACES ('http://swp.converteam.com'...
September 29, 2011 at 6:50 am
It's the same as any other correlated subquery. The processor first checks for the field in the scope of the subquery. If it can't find the field there,...
September 28, 2011 at 3:13 pm
It's because you're doing a string comparison. For example, since the character '4' comes after the character '2', any string that begins with a '4' is greater than any...
September 28, 2011 at 11:44 am
Sean Lange (9/28/2011)
I will reformat this in c style blocking so you can see what was happening with the structure the way you had it.
Since you didn't include your code...
September 28, 2011 at 10:01 am
Kingston Dhasian (9/28/2011)
DECLARE @from_date DATETIME
SET @from_date = '11-Sep-2011'
SELECT CASE
WHEN DATEADD( MONTH, DATEDIFF(...
September 28, 2011 at 8:40 am
SQLRNNR (9/28/2011)
It appears there is an issue with how SQL handles dates that land on Sunday.
Actually the problem lies with this piece of code:
DATEADD(wk, DATEDIFF(wk, 0, GetDate()), 0)
Similar code works...
September 28, 2011 at 8:27 am
I think that this will give you want you need without depending on having a complete history of the transactions.
;
WITH Items AS (
SELECT ItemID
, EndDate
, Row_Number() OVER( PARTITION BY ItemID...
September 27, 2011 at 9:47 am
The only thing that I would suggest is that since AccumID is already character data, it doesn't make sense to (implicitly) convert it to an integer and then (explicitly) convert...
September 27, 2011 at 8:32 am
Viewing 15 posts - 3,586 through 3,600 (of 4,087 total)