Viewing 15 posts - 5,731 through 5,745 (of 7,597 total)
Oldest active transaction:
SPID (server process ID): 149
UID (user ID) : -1
Name : user_transaction
LSN : (3978:123016:460)
Start time : Sep 29 2014 11:37:23:380AM
To be sure of the...
October 2, 2014 at 2:31 pm
If it's varchar, best would be to test it as varchar, thus not converting the column ... but that is only safe if all values are consistently left-padded with zero(s).
Either...
October 2, 2014 at 1:37 pm
Format 'YYYYMMDD hh:mm' is always accurately translated in SQL Server.
Therefore, you need just two STUFFs:
SELECT
varchar_data AS original_string,
CAST(STUFF(STUFF(varchar_data, 9, 0, ' '),...
October 2, 2014 at 1:16 pm
True, if they actually are using SQL 2012. Sometimes you can't be sure :-D.
October 1, 2014 at 3:12 pm
The original version I wrote of this was in 2006 for Experts Exchange, and it was to strip nonnumeric chars (although of course the basic idea is the same):
http://www.experts-exchange.com/Database/MS-SQL-Server/Q_21957163.html
Of course...
October 1, 2014 at 3:01 pm
Can we assume the large tables have indexes keyed on the IDs that are being passed in?
If so, and the IDs are in a (fairly) tight range, you could also...
October 1, 2014 at 2:44 pm
--Probably easiest would be to put the control values into a separate table, and if necessary use exclusive locks on that table when seeding that table.
CREATE TABLE dbo.control_table (
...
October 1, 2014 at 2:25 pm
No, changing the column size requires full logging for whatever logging it needs.
But note that increasing a varchar(nnnn) column should only change catalog data, not the data pages, so it...
October 1, 2014 at 1:31 pm
No, because non-materialized views don't occupy data space in the db. Only the view definition is stored; the data is generated from the underlying tables when the view is...
October 1, 2014 at 1:27 pm
FWIW, my code for computing max possible row length returns a length of 11870 for that table.
September 30, 2014 at 9:26 am
Yes. Honestly, it's because that's just the way SQL works.
If a row doesn't fit, SQL will look for any (MAX) columns that are currently being stored in the row....
September 29, 2014 at 12:55 pm
ross.mason 49698 (9/29/2014)
September 29, 2014 at 12:36 pm
Another possibility might be to use a differential backup to do the forward recovery rather than applying logs, particularly if the log process is slow.
Take a differential backup on the...
September 29, 2014 at 12:13 pm
While this will slow down processing of the value(s) somewhat, change the datatype of one (or more) of the longest columns -- [UserName_vc], [OfficeEmailAddress_vc], [HomeEmailAddress_vc] -- from nvarchar(320) to nvarchar(max)....
September 29, 2014 at 11:57 am
You can use CROSS APPLY to effectively assign an alias to an expression and then use it in any SQL clause:
SELECT test + ...,
FROM ...
CROSS APPLY (
...
September 29, 2014 at 11:51 am
Viewing 15 posts - 5,731 through 5,745 (of 7,597 total)