Quantcast
Channel: Liquibase Forums
Viewing all articles
Browse latest Browse all 2993

Code generated for a conditional index gives error in MS SQL Server

$
0
0
I have this following index in my SQL Server Database
CREATE NONCLUSTERED INDEX XCR_ACTIVE ON dbo.CS_PA_VEH_BASE ( ETL_ACTIVE_FL ) WHERE ETL_ACTIVE_FL = 'N' ON "default";

for which liquibase gives out following:
<createIndex indexName="XCR_ACTIVE" tableName="CS_PA_VEH_DELTA">
            <column computed="true" name="([ETL_ACTIVE_FL]='N')"/>
 </createIndex>

But when I want to execute it (also in MS SQL Server) I get the following error:
 (14.2) 05-24-19 11:43:05 (E) (13004:15088) RUN-050304: |Session JOB_ODS_Liquibase
                                                       Function call <raise_exception ( Liquibase update error:      -1: Unexpected error running Liquibase: Incorrect syntax near
                                                       '('. [Failed SQL: CREATE NONCLUSTERED INDEX XCR_ACTIVE ON [dbo].[CS_PA_VEH_DELTA](([ETL_ACTIVE_FL]='N'))] ) > failed, due to
                                                       error <50316>: <Liquibase update error:      -1: Unexpected error running Liquibase: Incorrect syntax near '('. [Failed SQL:
                                                       CREATE NONCLUSTERED INDEX XCR_ACTIVE ON [dbo].[CS_PA_VEH_DELTA](([ETL_ACTIVE_FL]='N'))]>.
I hope it's not the first time this is happening to someone.

Viewing all articles
Browse latest Browse all 2993

Trending Articles