Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - tpRox

Pages: [1]
1
A year late, but it's a slow day at work.

SELECT
'ALTER TABLE '+TABLE_NAME+' ALTER COLUMN '+COLUMN_NAME+' nvarchar('+RTRIM(CAST(CHARACTER_MAXIMUM_LENGTH as char))+') '+
(CASE WHEN IS_NULLABLE = 'YES' THEN 'null' ELSE 'not null' END) xRunThese
FROM INFORMATION_SCHEMA.COLUMNS
WHERE 1=1
AND DATA_TYPE = 'varchar'

Run this on the database, it won't make any changes to tables or columns, what it will do is generate sql commands you can then copy paste execute and that will change the column data types from varchar to nvarchar while preserving column length and nullable type.

You should have a backup before making any changes like this. You can selectively convert columns by not executing the entire result set. It'd be a good idea to not be trusting, look over the code and understand what it's doing before executing.

2
General Discussion / copy file gallery property
« on: 2014-11-21 22:47:27 »
Daan, thank you for you volunteer efforts. Thought I'd pose the question in case I was missing something. I decided I'd just move the file to retain the gallery info.

3
General Discussion / copy file gallery property
« on: 2014-11-21 02:29:11 »
Using TP9, and I believe even earlier versions, when a file is copied it does not retain any gallery info while keywords are copied. Is there any way to have the gallery retained when copying a file? The net result then would be two copies of the file in the gallery.

I'm moving files around but want to make sure the copy is good before deleting the original, only issue is loss of galleries.

Pages: [1]