Viewing 15 posts - 6,436 through 6,450 (of 8,753 total)
Quick solution based on an inline tally driven calendar table, should get you passed this hurdle
😎
USE tempdb;
GO
SET NOCOUNT ON;
DECLARE @DATE_FROM DATETIME = '2013-12-10 04:00:00.000';
DECLARE @DATE_TO DATETIME = '2014-12-10...
December 14, 2014 at 5:05 am
Thank you for the question Shiva, straight forward even if the wording could have been more precise;-)
Another interesting thing is that the option "ALLOW UPDATES" is depreciated and has in...
December 13, 2014 at 11:59 pm
locus (12/13/2014)
We have recently imported a database from Informix into 2008 R2, via linked server.
Everything came across perfectly with the exception of Time Interval columns.
Format 00:00:00, hours minutes seconds.
SQL...
December 13, 2014 at 11:49 pm
Quick thought, (and in-line with other responses), when opening SSMS do "Run as Administrator"
😎
December 13, 2014 at 2:10 pm
Quick question, what is the output of this query?
😎
EXEC sp_configure 'show advanced options',1;
RECONFIGURE;
EXEC sp_configure 'Ad Hoc Distributed Queries';
EXEC sp_configure 'show advanced options',0;
RECONFIGURE;
December 12, 2014 at 10:21 pm
sKreetz! (12/11/2014)
December 12, 2014 at 9:04 pm
Ashish Dutt (12/11/2014)
But I'm greeted with the following error on executing the query you posted.
Msg 102, Level 15, State 1, Line 13
Incorrect syntax near 'b'.
The error...
December 12, 2014 at 9:15 am
There are few ways of doing this, here is a quick window function solution for SQL Server 2012/14
😎
USE tempdb;
GO
SET NOCOUNT ON;
IF OBJECT_ID('dbo.TBL_LABEL') IS NOT NULL DROP TABLE dbo.TBL_LABEL;
CREATE TABLE dbo.TBL_LABEL
(
...
December 12, 2014 at 12:57 am
Quick thought, switch from group by to window function with output de-duplication
😎
use MICE
SELECT
*
into School_Perform_Data_2020
FROM
(
select
ROW_NUMBER() OVER
(
...
December 11, 2014 at 10:33 pm
SQL!$@w$0ME (12/11/2014)
We are migrating from sql2005 to sql2014. Should I go with SQL2014 RTM and wait for SP1 rather than installing RTM+CU4?Many thanks in advance.
My advice is to go for...
December 11, 2014 at 10:25 pm
Quick thought, looks like somewhere in the dataflow a column or set of columns are defined as unicode (65001), look out for DT_WSTR or DT_NTEXT in the column properties.
😎
December 11, 2014 at 10:18 pm
Further on Grant't post, here's a code snip for retrieving the execution plan
😎
USE tempdb;
GO
SET NOCOUNT ON;
/*
The query
*/
select
*
from sys.objects
/* get the execution plan */
;WITH XMLNAMESPACES...
December 11, 2014 at 2:35 pm
Sean Lange (12/11/2014)
Eirikur Eiriksson (12/11/2014)
Quick and simple row_number solution😎
This looks pretty close to mine. Just before I posted my solution I saw that the OP wanted the closest date that...
December 11, 2014 at 1:08 pm
Quick and simple row_number solution
😎
USE tempdb;
GO
SET NOCOUNT ON;
IF OBJECT_ID('tempdb..#TestTable') IS NOT NULL DROP TABLE #TestTable;
SELECT PK, Terminal, MarketDate = CAST(d.MarketDate AS DATETIME)
,d.Prod, d.Cost
INTO #TestTable
FROM (
SELECT 1, 1, '2014-12-01 15:04:00.000','A', 2.23...
December 11, 2014 at 12:49 pm
Viewing 15 posts - 6,436 through 6,450 (of 8,753 total)