Viewing 15 posts - 106 through 120 (of 274 total)
SET @cmd = 'DECLARE TableCursor CURSOR FOR
...
August 5, 2010 at 1:19 pm
...
SET @cmd = 'DECLARE TableCursor CURSOR FOR
...
August 5, 2010 at 1:02 pm
Interesting. I wouldn't think even an EXISTS() column by column would be overall faster, but slower.
Because, if at least one column has no data, you will have to scan...
August 5, 2010 at 8:59 am
Sorry, yes, I forgot to mention the table type.
Scanning the table once for every column is huge extra overhead, of course. To do it that quickly, you have a...
August 4, 2010 at 7:41 am
Hmm, no reason it should arbitrarily stop, altho that method of concatening values can supposedly be flaky.
Did you check the Query settings, to make sure it's not just a display...
August 2, 2010 at 12:07 pm
I have a table with 207 columns, and very long column names, the average being approx 26 characters. The code you posted truncates the @sql at just...
August 2, 2010 at 7:44 am
Fill in your table name and uncomment the EXEC() when ready to go.
DECLARE @tablename sysname
SET @tablename = N'info' --<<-- put table name here 🙂
DECLARE @sql varchar(max)
SET
July 30, 2010 at 1:19 pm
I suggest creating another table containing every possible 3-char value, clustered on that code (fillfactor 100). Then join to that table and find the first one that isn't in...
July 30, 2010 at 12:44 pm
You could generate the needed code fairly easily from INFORMATION_SCHEMA.columns.
You have to decide, though, what specifically you mean by "no data".
Must the column be NULL?
If it's a non-nullable...
July 30, 2010 at 12:35 pm
OOPS, right, I forgot to add a check against the count of the input values (I didn't test it, since I didn't have test data readily available):
SELECT --add column name...
July 29, 2010 at 2:40 pm
I will assume that the input sequence of the DecisionIds does not matter -- as long as all match, it doesn't what order they were in.
I think something like this...
July 29, 2010 at 2:18 pm
Perhaps. I thought SQL would still back up all active parts of the log. I was trying to cover all possibilities, since otherwise OP is in for a...
July 27, 2010 at 12:11 pm
Yes, you have to change the db recovery mode and do a full backup first (or tell SQL you have done one). Then you can do a log backup.
And,...
July 27, 2010 at 10:44 am
Is the db is full recovery mode?
If so, the old data is still on the transaction log.
Software is available that can pull that data from the log. Unfortunately, I...
July 27, 2010 at 8:45 am
Viewing 15 posts - 106 through 120 (of 274 total)