dbTalk Databases Forums  

how to create a table from a view

sybase.public.sqlanywhere.general sybase.public.sqlanywhere.general


Discuss how to create a table from a view in the sybase.public.sqlanywhere.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Deepali
 
Posts: n/a

Default how to create a table from a view - 11-04-2009 , 10:15 AM






how to create a table from a view in ASA7 database.

Reply With Quote
  #2  
Old   
Nick Elson [Sybase iAnywhere]
 
Posts: n/a

Default Re: how to create a table from a view - 11-04-2009 , 07:06 PM






You might want to use

dbunload -n -t table_list -r source_tables_of_view.sql -c "..."

to unload the definitions of the tables used in the view and rangle
the definitions of those into a new create table statement matching
your requirements. After you create the new table, if you need
to populate it with the existing data by doing and

insert into new_table select <same select-list etc as the view's query\>

.... otherwise ....

I'm not certain if there is any simple way to do that more generally
or directly. Part of the problem is the way people sometimes use
views and there is some question what the result should look like.

Had you started from a DataModelling tool (like PowerDesigner)
this may be easier to do, but if you are not already set up that
way the setup and learning time might not be worth the effort.
You IDE may provide some capabilites along these lines.




"Deepali" wrote in message news:4af1a894.483f.1681692777 (AT) sybase (DOT) com...
> how to create a table from a view in ASA7 database.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.