Viewing 15 posts - 3,046 through 3,060 (of 4,087 total)
You should not be using the arithmetic subtraction operator to calculate differences between date or time expressions. Subtract will only work with the old DATETIME and SMALLDATETIME data types....
June 3, 2015 at 8:23 am
What he's trying to do is set up a key code to run a procedure, so that he can highlight a section of text in a query and hit the...
August 29, 2013 at 1:55 pm
First, this is an SSIS issue, not a T-SQL question, so it should really be posted in the SSIS forum.
The problem is that Excel determines the field lengths/types by sampling...
August 26, 2013 at 2:33 pm
Fuel type is stored in an attribute of the Fuel element, so you need to give the path to that attribute rather than referencing the element itself.
c3.value('@type', 'varchar(30)') AS [Fuel...
August 20, 2013 at 8:11 am
Slightly shorter
DECLARE @Sort1 varchar(10)='val3'; --NOTE: @Sort2 ommitted from this example because I am still stuck on @sort1
--DECLARE @Sort1 varchar(10)='val3';
DECLARE @x TABLE (val1 varchar(10) not null, val2 varchar(10) not null,val3 int);
INSERT...
August 19, 2013 at 2:53 pm
WITH ROLLUP is being deprecated in favor of the ROLLUP() function. Here is the query rewritten using the ROLLUP() function.
;WITH CTE0 AS
(
SELECT Section
,NAME
,RowOrdering = ROW_NUMBER() OVER (ORDER BY Section,...
August 19, 2013 at 7:34 am
First, your XML is not valid. You can only assign values to attributes and you are trying to assign them to the tag.
<TOP_LEVEL_ITEM= "TOP LEVEL TYPE A" TOP_LEVEL_ID="294">
This needs...
March 1, 2013 at 1:03 pm
Jeff Moden (2/15/2013)
OTF (2/15/2013)
You can also take a look at using OUTPUT.
I've found that to be a wee bit more difficult than you would think unless you have an alternate...
February 19, 2013 at 2:45 pm
The solution provided in your link is likely to be the fastest. (It essentially the same as what Paul is suggesting, but limiting the buckets to only the specific...
February 8, 2013 at 12:14 pm
akberali67 (2/8/2013)
Are Rollup and Cube stored procedures because sql doesnt seem to be recognizing them. I am using SQL Server 2005, maybe thats the problem?
No, but the syntax was changed...
February 8, 2013 at 11:21 am
MyDoggieJessie (2/8/2013)
February 8, 2013 at 10:20 am
You're not using the Txn CTE anywhere in your UPDATE statement, so you can drop it without changing the results of your query. I believe that is the worktable...
February 8, 2013 at 9:14 am
ScottPletcher (1/21/2013)
I guess your...
January 21, 2013 at 2:51 pm
GilaMonster (1/17/2013)
Also, since this is SQL 2008, have a read up on Grouping Sets. They allow a lot more flexibility than cube and rollup do.
Especially since WITH CUBE and WITH...
January 17, 2013 at 10:16 am
Your attached query has a similar problem. The optional FROM clause in a SELECT statement is the same as in a DELETE statement.
1) The FROM keyword...
January 17, 2013 at 10:05 am
Viewing 15 posts - 3,046 through 3,060 (of 4,087 total)