Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2002
    Location
    Lawrence, KS
    Posts
    14

    Unanswered: Re-create View DDL in another database?

    Does anyone know how I can re-create a view that exists in one database in another database of the same structure? I think that I have seen some discussion on how to re-create tables & indexes by reading from the systems tables, but I could not figure out how to do the same thing with views.

    Any help would be appreciated.

    --tkofford

  2. #2
    Join Date
    Aug 2004
    Posts
    38
    If it's ASE, then sp_helptext viewname should give you the create view statement.

    You can also use defncopy to extract the create view command to a file. Once you have this you can use defncopy to put it back into the other database.

    I would also guess that you could use Sybase Central for both ASE and ASA, although I haven't used it for some time.

    HTH

  3. #3
    Join Date
    Aug 2002
    Location
    Lawrence, KS
    Posts
    14
    The procedure sp_helptext <view name> works like a charm.

    Thanks a lot for the help!

    --tkofford

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •