Viewing 15 posts - 1 through 15 (of 31 total)
Since you're using SQL2012, have you looked at LEAD and LAG?
My first naive stab would be:
priors AS (
,prev = LAG(startTime) OVER (
PARTITION BY userID
ORDER BY startTime
October 11, 2013 at 5:22 am
I also often have this need (e.g. when I'm running a differential backup scheme and don't want the 'chain' to be broken).
The closest I get to achieving this is to...
October 11, 2013 at 4:54 am
I feel like a bit of a troll for this -- I don't mean to be -- but...
I can never truly put my finger on the exact problems I have...
September 12, 2013 at 6:15 am
wbrianwhite 33048 (9/3/2013)
Otherwise you introduce the likelihood that...there is a significant time in deployments between when table updates are applied and code is applied during which something won't work.
wbrianwhite 33048 (9/3/2013)
September 3, 2013 at 5:42 am
I might also add that, for FUNCTIONS, given that I like to use inline table functions as much as is reasonable, that I'd probably go with the following:
WITH params AS...
September 3, 2013 at 4:59 am
I'm echoing the responses of the others but, if I was working on a database-only solution and didn't have the benefits of a front-end app to manage and supply parameters...
September 3, 2013 at 4:48 am
Cannot import. Error accessing the registry.
If you don't have the OS privileges to globally edit your Registry, you'll need the assistance of your server administrators. If you can't...
July 10, 2013 at 2:57 pm
July 9, 2013 at 12:37 pm
If you want a pure key-value store, have you looked at Redis (http://redis.io)?
It basically responds to commands like:SET key value...andGET key
SET key value
There is a nice online demo at http://try.redis.io/,...
July 9, 2013 at 11:35 am
TL;DR: Use a combination of mirroring and log-shipping, depending on your needs; high-availability should not be the responsibility of the DBA, alone.
From a purely technical standpoint, I find that...
July 9, 2013 at 10:47 am
This is more a question of code organisation -- something that only improves with practice.
Remember that you can create as many classes as you need to run your application (i.e....
July 9, 2013 at 5:57 am
What OS user is running your SQL Server instance?
What SQL user is running your stored procedure?
How are you accessing the file, when it is on the same server?
What file-transfer protocols...
July 8, 2013 at 8:59 am
You are mixing up the SQL with the VB and confusing yourself. Not to mention, introducing a massive SQL-injection hole, by building up the string in that fashion.
July 8, 2013 at 8:38 am
At the risk of incurring the wrath of the pure SQL guts on the forum, for what it is worth, I'll bite... 🙂
You have not specified a definition for MyVariable;...
July 8, 2013 at 8:27 am
Not that I advocate this approach, at all, but the following should allow you to get a column list for any server/database/schema/table combo...
DECLARE @liststr NVARCHAR(MAX) = NULL,
July 8, 2013 at 6:32 am