Toad World® Forums

Highlighting of keyword: PERSISTED


#1

Computed Columns: PERSISTED keyword – not highlighted:

Take a script like this:

CREATE TABLE dbo . testComputedColumns

( id int IDENTITY ( 1 , 1 ) NOT NULL,

Price money NOT NULL,

Quantity int NOT NULL,

ExtendedPrice AS Price * Quantity ,

PersistedExtendedPrice AS Price * Quantity PERSISTED )

In SQL Management Studio it shows with PERSISTED in Blue:

In Toad, it doesn’t:

If you execute the script in SSMS it runs successfully.

If you execute the script in Toad it fails with error:

SQL Server Database Error: CREATE TABLE failed because the following SET options
have incorrect settings: ‘ARITHABORT’. Verify that SET options are correct for
use with indexed views and/or indexes on computed columns and/or filtered
indexes and/or query notifications and/or XML data type methods and/or spatial
index operations.

Darren

image004.png

image004.png


#2

I will add the “PERSISTED” keyword to the syntax highlighting list
to make sure it is properly highlighted for next release, thanks.

I’m not sure what is going on with the DB runtime error. Any idea what the
current value of the SET ARITHABORT is?

David


#3

I will add the “PERSISTED” keyword to the syntax highlighting list
to make sure it is properly highlighted for next release, thanks.

I’m not sure what is going on with the DB runtime error. Any idea what the
current value of the SET ARITHABORT is?

David
image004.png


#4

I’m getting the same error even if I explicitly set ARITHABORT OFF before
running the script. What’s strange is that it doesn’t give that
error in SSMS – the script just runs.

Not sure why it would be different in Toad. If you can’t repro it may be
specific to my database… I figured I’d report it anyway in case
it’s not.

Darren


#5

I’m getting the same error even if I explicitly set ARITHABORT OFF before
running the script. What’s strange is that it doesn’t give that
error in SSMS – the script just runs.

Not sure why it would be different in Toad. If you can’t repro it may be
specific to my database… I figured I’d report it anyway in case
it’s not.

Darren
image004.png