Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ () — Sybase SQL Server 4.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

  1                       Version 4.0 -- 1/15/89            sp_helpjoins
  ______________________________________________________________________

  NAME:  sp_helpjoins

  FUNCTION:
       Lists the columns in two tables or views  that  are  likely  join
       candidates.

  SYNTAX:
       sp_helpjoins lefttab, righttab

  EXAMPLES:
       sp_helpjoins sysobjects, syscolumns








  sp_helpjoins            Version 4.0 -- 1/15/89                       2
  ______________________________________________________________________
       Displays a list of columns that are likely join candidates in the
       tables sysobjects and syscolumns:

       first_pair                second_pair               third_pair
       fourth_pair               fifth_pair                sixth_pair
       seventh_pair              eighth_pair
       ------------ ------------ ------------ ------------ ------------ ------------
       ------------ ------------ ------------ ------------ ------------ ------------
       ------------ ------------ ------------ ------------
       id           id           NULL         NULL         NULL         NULL
       NULL         NULL         NULL         NULL         NULL         NULL
       NULL         NULL         NULL         NULL

       (1 row affected)

  PARAMETERS:
       lefttab -  is the first table or view.



  3                       Version 4.0 -- 1/15/89            sp_helpjoins
  ______________________________________________________________________
       righttab -  is the second table or view.  The order of the param-
           eters does not matter.

  COMMENTS:

       o The column pairs  that  sp_helpjoins  displays  come  from  two
         sources.   First,  sp_helpjoins checks the syskeys table in the
         current database to see if any common keys have been defined on
         the  two tables with sp_commonkey.  If it doesn't find any com-
         mon keys there, the procedure applies less restrictive criteria
         to  come  up  with  any  keys that may be reasonably joined: it
         checks for keys with the  same  user  datatypes,  and  if  that
         fails, for columns with the same name and datatype.
       o The sp_helpjoins procedure does not create any joins.

  MESSAGES:
       The table specified as the lefttab parameter is not  a  table  or



  sp_helpjoins            Version 4.0 -- 1/15/89                       4
  ______________________________________________________________________
           view in the current database.
       The table specified as the righttab parameter is not a  table  or
           view in the current database.

  PERMISSIONS:
       Execute permission to public.

  TABLES USED:
       syscolumns, syskeys, sysobjects

  SEE ALSO:
       sp_commonkey, sp_foreignkey, sp_primarykey, sp_help,  sp_helpkey,
       Joins






Typewritten Software • bear@typewritten.org • Edmonds, WA 98026