Viewing 15 posts - 451 through 465 (of 1,193 total)
tarr94 (5/6/2016)
I've updated my original post to...
May 6, 2016 at 3:02 pm
This is the sort of thing I would avoid doing at the database layer if possible, but if it must be done, here's one way (kudos on the sample data,...
May 6, 2016 at 2:23 pm
SQLRO (5/6/2016)
The val is actually a binary value. So I tried doing the below as per your suggestion.declare @varBin as varbinary(max)
set @varBin = 0x06E3231322020202020203737363533313231322020202020203737323137364D616E756661637475726573206F66206361726275726574746F727320616E6420706172747320666F722074776F2026207468726565A
SELECT convert(varbinary(max),STUFF(@varBin,3,1,''))
--Result
0x06E31322020202020203737363533313231322020202020203737323137364D616E756661637475726573206F66206361726275726574746F727320616E6420706172747320666F722074776F2026207468726565A
In addition to Lowell's suggestion,...
May 6, 2016 at 8:58 am
The problem is that the join is just on the invoice ID. All three lines have the same invoice ID, so all three rows from the before table match all...
May 5, 2016 at 2:52 pm
sys.dm_exec_sessions has a group_id column, which is the id of the workload group to which that session is assigned. You can join that with the appropriate resource governor DMVs.
This is...
May 5, 2016 at 9:24 am
pietlinden (5/4/2016)
http://sqlinthewild.co.za/index.php/2009/08/17/exists-vs-in/
I would have sworn that EXISTS stops as soon as a True/False changes, while an IN reads the whole table. So I would...
May 4, 2016 at 11:35 am
It's not well documented by MS (or at all, maybe), but copy-only fulls will not allow log backups to be taken if they are the only full since the DB...
May 4, 2016 at 8:23 am
PSB (5/3/2016)
I want the CST time recorded . If I don't do a -5 then May3rd, 7pm would be inserted as May 4th,00 am .
Maybe I'm misunderstanding the situation and...
May 3, 2016 at 8:18 am
The row goals introduced by things like TOP can sometimes cause incorrect estimates.
https://blogs.msdn.microsoft.com/bartd/2012/03/14/row-goals-gone-rogue/ is one good examination of that.
Also, with an outer join, the placement of the criterion for the...
May 2, 2016 at 9:33 am
MotivateMan1394 (5/1/2016)
It means every day should be more than prev day. Because value of execution...
May 2, 2016 at 7:33 am
I might be missing something (probably am, since others have already suggested things to check, indicating they've understood what the problem is), but what exactly is the problem? I haven't...
April 30, 2016 at 10:58 am
Also reminds me of a quote from 30 Rock that seems to be how a lot of people approach technology:
Tracy Jordan: Doctor Spaceman, when they check my DNA, will they...
April 29, 2016 at 3:43 pm
J Livingston SQL (4/29/2016)
Jacob Wilkins (4/29/2016)
J Livingston SQL (4/29/2016)
Jacob...dont seem to get the results expected from your code in comparison to mine.....have I misread your code:
You didn't misread it, but...
April 29, 2016 at 3:35 pm
J Livingston SQL (4/29/2016)
Jacob...dont seem to get the results expected from your code in comparison to mine.....have I misread your code:
You didn't misread it, but the sample data doesn't conform...
April 29, 2016 at 3:03 pm
If the time matters (say, you have multiple rows per day), then I don't think this approach will work well.
If you only care about date, then it works pretty well,...
April 29, 2016 at 1:21 pm
Viewing 15 posts - 451 through 465 (of 1,193 total)