DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 3 of 3
  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

    >



Bookmarks

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


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links