Viewing 14 posts - 1 through 14 (of 14 total)
Jeff Moden (1/8/2016)
sql_only (1/8/2016)
Jeff Moden (1/8/2016)
sql_only (1/8/2016)
bcp mydb.dbo.mytable in 'C:\_value_.txt' -S mypc\instancename -T
But the error I keep getting is...
January 8, 2016 at 7:18 am
Jeff Moden (1/8/2016)
sql_only (1/8/2016)
bcp mydb.dbo.mytable in 'C:\_value_.txt' -S mypc\instancename -T
But the error I keep getting is unable to open...
January 8, 2016 at 6:50 am
I want to import data to my database via bcp like this
bcp mydb.dbo.mytable in 'C:\_value_.txt' -S mypc\instancename -T
But the error I keep getting is unable to open BCP host data...
January 8, 2016 at 6:25 am
Phil Parkin (1/6/2016)
sql_only (1/6/2016)
Phil Parkin (1/6/2016)
sql_only (1/6/2016)
was missing DECIMAL(18,16)...Might as well use (19,16) or (19,17) – same space occupied on disk (ref. here).
Yes you're right.
I have had to settle...
January 6, 2016 at 8:01 am
Phil Parkin (1/6/2016)
sql_only (1/6/2016)
was missing DECIMAL(18,16)...Might as well use (19,16) or (19,17) – same space occupied on disk (ref. here).
Yes you're right.
I have had to settle with 2 though,...
January 6, 2016 at 6:52 am
DECLARE @tb_correlation TABLE (cl_time DATETIME,cl_first DECIMAL,cl_second DECIMAL)
--insert your data
;WITH te_correlation
AS
(
SELECT cl_time,
POWER(RANK() OVER (ORDER BY cl_first)-RANK() OVER (ORDER BY cl_second),2) AS corr
FROM @tb_correlation
ORDER BY cl_time
OFFSET 0 ROWS
)
SELECT
cl_time,
SUM(corr) --apply windowing here
FROM...
January 6, 2016 at 5:24 am
Hugo Kornelis (1/5/2016)
January 6, 2016 at 2:06 am
It turns out that even if this UDA is assembled, it can only be used with partition by in the over clause.
Will seek a strictly sql solution, no longer need...
January 5, 2016 at 12:41 pm
It is a pity SQL Server has no inbuilt aggregate functions for correlation. 😉 I have to build one from scratch.
My function takes two columns so I will need to...
January 5, 2016 at 4:58 am
TheSQLGuru (1/3/2016)
January 3, 2016 at 8:28 am
Eirikur Eiriksson (1/3/2016)
This is not possible in this way, the over clause cannot be used with user defined functions.😎
Okay thanks, no wonder there is nothing online about this
January 3, 2016 at 8:26 am
Yes there is, not only in terms of performance but it's also more legible and maintainable
Edit: Replaced a local variable with a CTE, close to 50% improvement in performance;-)
Thank you...
December 30, 2015 at 5:58 am
Viewing 14 posts - 1 through 14 (of 14 total)