Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2005
    Posts
    4

    Unanswered: Stored Procedures dynamic?

    hello

    I want to return the static procedures, in dynamic, that is to say, that points at several db. For example:

    select
    d.levelid as cod_nivel,
    d.name as nom_nivel,
    c.parallelid as cod_paralelo
    from
    [Secundaria].[dbo].[Course] a,
    [Secundaria].[dbo].[Parallel] c,
    [Secundaria].[dbo].[mLevel] d,
    [Secundaria].[dbo].[Specialization] b,
    [Secundaria].[dbo].[SchoolYear] e

    /* The opcion a distinct bd with on only procedure
    from Secundaria,
    from Primaria,
    from Quitumbe, etc...*/

    where a.parallelid = c.parallelid
    and a.levelid = d.levelid



    thanks
    Last edited by miguelmrj45; 01-11-05 at 19:19.

  2. #2
    Join Date
    Feb 2004
    Posts
    492
    Why go dynamic?
    Are the selects the same for all the other databases?

    Do you mean:
    Code:
    select [column/s]
    from database1..[table/s]
    
    or
    
    select [columns]
    from database2..[table/s]
    or

    Code:
    select [columns]
    from database1.[tables]
    ,    database2.[tables]

Posting Permissions

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