Viewing 15 posts - 5,746 through 5,760 (of 7,614 total)
Did you try -1 as the length? Just a guess, but that's how SQL represents "MAX" internally in its system tables.
October 2, 2014 at 2:48 pm
SQL will have to pull back all rows, then apply the WHERE conditions.
You need to add the relevant WHERE conditions:
WHERE oq.calldate > getdate() -1
AND oq.duration > ''00:00:20'''
to the remote query...
October 2, 2014 at 2:34 pm
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
Viewing 15 posts - 5,746 through 5,760 (of 7,614 total)