Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2002
    Location
    USA-CA
    Posts
    36

    Smile Unanswered: Do you know some another way to recieve a list of tables

    Hello All,

    In the code below, a store procedure sp_help
    gives a great number of records both for tables, triggers, views, etc.
    I've tried to filter this great record by using awk.
    But awk writes me that the record is too long...


    Do you know some another way to recieve a list of tables
    in the current DB?


    Many thanks.
    John.

    ...
    for CurrentDBName in $DB_Names
    do
    echo "CurrentDBName = " $CurrentDBName

    cmd_1=`${SYBASE}/bin/isql -b -D${CurrentDBName} -SSYB_SID -Usa -P <<EOF
    go
    sp_help
    go
    EOF`

    echo $cmd_1 >> file1.tmp

    done

    awk '{print $i}' file1.tmp
    John Smith

  2. #2
    Join Date
    Mar 2001
    Location
    Lexington, KY
    Posts
    606
    Code:
    SELECT name
      FROM sysobjects
     WHERE type = 'U'
    Thanks,

    Matt

  3. #3
    Join Date
    Apr 2002
    Location
    USA-CA
    Posts
    36

    Thank You very much indeed!

    Thank You very much indeed!

    John.
    John Smith

Posting Permissions

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