Wednesday, July 29, 2015

Tip of The Day: Keeping VIEW Alias Column Data Types in Sync
Product: R:BASE eXtreme 9.5 (32/64) and R:BASE X (Version 10)
Build..: 9.5.5.20730, 10.0.1.10703 or higher
www.rbaseupdates.com
www.rupdates.com (Mirror Site)
Section.: VIEWS
Keywords: Alias Column Data Type

Did you know ...

If you define a view with an alias column name or an expression, and
if that column name already exists in the database, now the VIEW will
also use the exact data type. No more guess work.

In addition to many front-end as well as engine-level enhancements,
the upcoming update of R:BASE eXtreme 9.5 and R:BASE X (Version 10)
will include a MAJOR enhancement to assign the data type for alias
column name(s) used in a VIEW.

So, here's how it works now ...

01. If a column alias in a view definition matches an existing
    column name in the database, and the data types are the same,
    no problem.

02. If a column alias in a view definition matches an existing column
    name in the database, but the data types are different, and the
    underlying values in the view are from a column and not an
    expression, then the engine will complain.

03. If a column alias in a view definition matches an existing column
    name in the database, and the underlying values in the view are
    from an expression, if the data type conversion is valid, no problem,
    otherwise engine will complain.

To control the data type for an expression in a view, use a column
alias whose name matches the name of a column in another table with the
data type you want. This might mean defining a table whose only reason
for existence is to provide data types for columns you are going to use
in views.

Stay tuned for a few more cool tips and techniques ....

Very Best R:egards,

Razzak

www.rbase.com
www.rbaseX.com
www.facebook.com/rbase
--
32 years of continuous innovation!
17 Years of R:BASE Technologies, Inc. making R:BASE what it is today!
--


Reply via email to