Viewing 15 posts - 2,536 through 2,550 (of 7,187 total)
If you want to concentrate on connections, monitor the performance counter SQLServer: General Statistics – User Connections. For a more sophisticated analysis, you might also include other counters such...
June 22, 2016 at 1:10 am
Yes, the 2 is converted into a date - 3rd January 1900, so you'll always get Wednesday for that, no matter what your language settings.
John
June 21, 2016 at 6:46 am
Well, it works for me if I convert to nvarchar(23) instead of datetime, and make a couple of other minor tweaks, thus:
set @SQLQuery = 'SELECT RequestDate, IP, RequestID, CustomerID, LoanID,...
June 21, 2016 at 5:02 am
Why do you have [font="Courier New"]cast(@RequestDate as datetime)[/font] when @RequestDate is already datetime? Do you not want to cast it to nvarchar(23) or something like that? Better still...
June 21, 2016 at 3:51 am
Sounds like a job for the MERGE statement (although make sure you understand the pitfalls before you use it). I can't be any more specific, though, without table DDL...
June 10, 2016 at 4:07 am
tom.gjos (6/10/2016)
Thanks for good article!Haven't seen "_(dt_year)" before?
How is the underscore here working?
SELECT dt, dt_year
FROM (VALUES (GetDate())) cur(dt)
CROSS APPLY (SELECT YEAR(cur.dt)) _(dt_year)
It's just an alias for the virtual table [font="Courier...
June 10, 2016 at 4:02 am
Talib123 (6/10/2016)
You need to play a...
June 10, 2016 at 3:56 am
With that example there's no difference, so my advice would be to go with what's simplest. But if you were to put the dynamic SQL version into a stored...
June 10, 2016 at 2:22 am
Write a script in Powershell (or your favourite scripting language) that will take the most recent file and copy it to its destination. Alternatively, there's probably a task in...
June 9, 2016 at 6:02 am
No, I don't think so, unless you've already got something set up to track changes like that.
John
June 9, 2016 at 6:00 am
If n is small, it can be more efficient to use char(n). The storage requirement for varchar(n) includes a two-byte overhead to handle the variable length.
John
June 9, 2016 at 5:25 am
No, SQL Server Browser is just to resolve instance name to port name on the local computer.
John
June 9, 2016 at 1:59 am
Welsh Corgi (6/8/2016)
I am getting a Primary Key Violation when Loading a Table.I queried the source table and there is only one record with value of the primary key.
In that...
June 8, 2016 at 9:55 am
Brilliant! I knew there'd be a better way of doing it. You're returning that final separator, but that can be either ignored or easily got rid of.
John
June 8, 2016 at 9:36 am
Yes, with queries, part of the execution time is transmitting and displaying the result set. With maintenance activities, that's a very much small proportion of the work that's done.
John
June 8, 2016 at 5:45 am
Viewing 15 posts - 2,536 through 2,550 (of 7,187 total)