Re: Create view

From: Bernard Peek <bap_at_shrdlu.com>
Date: Wed, 2 Oct 2002 00:50:04 +0100
Message-ID: <2xjcnNPsSjm9EwIY_at_diamond9.demon.co.uk>


In message <c22bb40d.0210010624.16284872_at_posting.google.com>, K.Y. Fung <kyfung_at_hotmail.com> writes
>How to create a view which have different data type and column length
>from the original base table?
>
>For example, the base table consists of:
>
>name character 50
>telephone character 50
>address character 150
>
>the view should have columns:
>
>username character 30
>userphone character 20
>useraddr character varying 100

There is insufficient information to give a complete answer. If your view has a 100 character column and the source table has a 150 character column then someone needs to decide on the algorithm for discarding data. Should you use the leftmost or rightmost characters in the source data? Should the algorithm return <null> if the source data is more than 100 characters?

-- 
Bernard Peek
bap_at_shrdlu.com
www.diversebooks.com: SF & Computing book reviews and more.....

In search of cognoscenti
Received on Wed Oct 02 2002 - 01:50:04 CEST

Original text of this message