1112
November 29, 2021, 1:57pm
1
CREATE table my_tbl ( my_col NVARCHAR(max) )
INSERT my_tbl ( my_col ) VALUES (‘1’),(‘1’)
using this sql in one cfquery :
ALTER TABLE my_tbl ALTER COLUMN my_col NVARCHAR(max) NOT NULL
CREATE UNIQUE INDEX my_tbl_idx ON my_col (my_col)
ALTER TABLE my_tbl ALTER COLUMN my_col NVARCHAR(max) NOT NULL*
is not executed due to UNIQUE INDEX creation failure
OS : winserver12
Java Version : 1.8
Tomcat Version : 9
Lucee Version : 5.73
SQL 2014
@1112 I’ve checked with your example in Lucee 5.3.7.47 and the latest version. For me, ALTER TABLE my_tbl ALTER COLUMN my_col NVARCHAR(max) NOT NULL query is executed successfully. Could you please share the exact scenario to replicate it?
1112
December 9, 2021, 8:01pm
3
sorry swap them
CREATE UNIQUE INDEX my_tbl_idx ON my_col (my_col)
ALTER TABLE my_tbl ALTER COLUMN my_col NVARCHAR(max) NOT NULL
silently ALTER have failed
lucee 5.3.7.43
class: ‘com.microsoft.sqlserver.jdbc.SQLServerDriver’
, bundleName: ‘org.lucee.mssql’
, bundleVersion: ‘7.2.2.jre8’