Filtered index syntax error: WHERE and WITH clauses swapped

Compares and synchronizes SQL database content.

Moderators: JonathanWatts, Chris Auckland, David Atkinson, Michelle Taylor, chengvoon.tong

Filtered index syntax error: WHERE and WITH clauses swapped

Postby shawnC » Mon Oct 29, 2012 11:08 am

SQL Data Compare 10.2.3.5 (and earlier) generates incorrect syntax for restoring filtered indexes that have a FILLFACTOR clause

The WHERE and WITH clauses are the wrong way around

What is generated:

Code: Select all
CREATE UNIQUE NONCLUSTERED INDEX [IXU_Foo] ON [Data].[Bar] ([BarID], [BarName]) WITH (FILLFACTOR=90)  WHERE ([BarName] IS NOT NULL) ON [PRIMARY]


This means that I have to use SQL Compare to fix the schema after synchronizing data and can't trust SQL Data Compare

Can this be fixed please?
shawnC
 
Posts: 13
Joined: Tue Nov 22, 2011 1:53 pm

Postby Brian Donahue » Tue Oct 30, 2012 3:39 pm

I'm sorry you have encountered this issue. I will be responding to you via email with the information relevant to troubleshooting this problem.

Thanks!
Brian Donahue
 
Posts: 6668
Joined: Mon Aug 23, 2004 10:48 am

Postby shawnC » Tue Oct 30, 2012 5:16 pm

Note: this *only* happens when you use a filtered index.

Using a WITH clause alone works OK. But not when you have a WITH and WHERE clause.

So there's no confusion...
shawnC
 
Posts: 13
Joined: Tue Nov 22, 2011 1:53 pm

Postby Brian Donahue » Tue Oct 30, 2012 5:39 pm

Thank you. I have logged a bug with our development team ( SDC-1502 ).
Brian Donahue
 
Posts: 6668
Joined: Mon Aug 23, 2004 10:48 am

Postby shawnC » Tue Dec 03, 2013 12:03 pm

One year later... any update please?
shawnC
 
Posts: 13
Joined: Tue Nov 22, 2011 1:53 pm


Return to SQL Data Compare 10

Who is online

Users browsing this forum: No registered users and 1 guest