Viewing 15 posts - 2,536 through 2,550 (of 7,191 total)
Steve
Try something like this, but bear in mind:
(1) I don't recommend you use this in your application - just for the stopgap period
(2) I haven't included any WHERE clause logic,...
June 22, 2016 at 6:25 am
RonMexico (6/21/2016)
...haven't had any luck changing the global default port within the Client Protocols....
No, that's for client applications on the server. Go to SQL Server Network Configuration -> Protocols...
June 22, 2016 at 6:13 am
Does db_name exist on the remote server? Does table_name exist in the dbo schema in db_name? What happens if you go to the remote server and run the...
June 22, 2016 at 4:19 am
Ragu
Care to post the query, please? I'm guessing it's got a syntax error or something else that prevents it from compiling. Do you have direct access to the...
June 22, 2016 at 3:53 am
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
Viewing 15 posts - 2,536 through 2,550 (of 7,191 total)