Defining & Creating views


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Defining & Creating views

Hybrid View

  1. #1
    neil Guest

    Defining & Creating views


    Hi,

    Is it possible to define a column when creating a view.

    I knowyou can determine the name of the column..but is there a way to determine
    content like when creating a table...

    i.e as in creating a table

    create tabe table1
    (column1 char(10));

    Is this possible with creating views...

    Any help would be grateful cheers

  2. #2
    JC Guest

    Re: Defining & Creating views


    Hi!

    nope, i don't think what you wanted could be done. but you could try something
    like this and it will generate the same result :

    Create View Pubs [Pub_name] <--- (optional)
    As
    Select cast(pub_name as Char(10))
    From Publishers
    Go


    hope this helps!

    JC


    "neil" <neil.ward@document.co.uk> wrote:
    >
    >Hi,
    >
    >Is it possible to define a column when creating a view.
    >
    >I knowyou can determine the name of the column..but is there a way to determine
    >content like when creating a table...
    >
    >i.e as in creating a table
    >
    >create tabe table1
    >(column1 char(10));
    >
    >Is this possible with creating views...
    >
    >Any help would be grateful cheers



  3. #3
    neil Guest

    Re: Defining & Creating views


    Cheers JC..this works a treat..many thanks

    Neil



    "JC" <jcarlosra@digitelone.com> wrote:
    >
    >Hi!
    >
    >nope, i don't think what you wanted could be done. but you could try something
    >like this and it will generate the same result :
    >
    > Create View Pubs [Pub_name] <--- (optional)
    > As
    > Select cast(pub_name as Char(10))
    > From Publishers
    > Go
    >
    >
    >hope this helps!



    >
    >JC
    >
    >
    >"neil" <neil.ward@document.co.uk> wrote:
    >>
    >>Hi,
    >>
    >>Is it possible to define a column when creating a view.
    >>
    >>I knowyou can determine the name of the column..but is there a way to determine
    >>content like when creating a table...
    >>
    >>i.e as in creating a table
    >>
    >>create tabe table1
    >>(column1 char(10));
    >>
    >>Is this possible with creating views...
    >>
    >>Any help would be grateful cheers

    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center