Loading ...
Sorry, an error occurred while loading the content.

Dynamic Join in Strored Procedure

Expand Messages
  • Rahul Verma
    Dear Friends, I want to create a strored procedure that get parameters as table names and type of joins between them. and return a full query with including
    Message 1 of 3 , Mar 8, 2006
    • 0 Attachment
      Dear Friends,
         I want to create a strored procedure that get parameters as table names and type of joins between them. and return a full query with including joins.
       
       
      Thanks
      Rahul Verma


      Jiyo cricket on Yahoo! India cricket
      Yahoo! Messenger Mobile Stay in touch with your buddies all the time.
    • nilesh babar
      You can write such proc but there will be limitaions in proc, depends on how many no of tables do u want to join and the joining columns. Rahul Verma
      Message 2 of 3 , Mar 9, 2006
      • 0 Attachment
        You can write such proc but there will be limitaions in proc, depends on how many no of tables do u want to join and the joining columns.

        Rahul Verma <rahulbestgroup@...> wrote:
        Dear Friends,
           I want to create a strored procedure that get parameters as table names and type of joins between them. and return a full query with including joins.
         
         
        Thanks
        Rahul Verma

        Jiyo cricket on Yahoo! India cricket
        Yahoo! Messenger Mobile Stay in touch with your buddies all the time.

        SPONSORED LINKS
        Sql queries Basic programming language C programming language
        Computer programming languages The c programming language C++ programming language


        Win a BlackBerry device from O2 with Yahoo!. Enter now.

      • Rahul Verma
        Dear Friend, Thanks for reply. I have no problem in passing the no of tables or join types. I can pass this as a string and break it with some delimeter
        Message 3 of 3 , Mar 9, 2006
        • 0 Attachment
          Dear Friend,
            Thanks for reply.
            I have no problem in passing the no of tables or join types. I can pass this as a string and break it with some delimeter provided by me. Actually I am not able to findout, how two or more table are related with each other.
           
            Let suppose, I have two parent tables like TableA and TableB. And In my child table TableC there are foreign keys available of these tables (ie TableA - AID and TableB - BID). So I am not able to find out these foreign keys at runtime in my stored procedure.
           
          Any help wll be appreicated.
           
          Thanks
          Rahul Verma

          nilesh babar <nilesh_babar2003@...> wrote:
          You can write such proc but there will be limitaions in proc, depends on how many no of tables do u want to join and the joining columns.

          Rahul Verma <rahulbestgroup@...> wrote:
          Dear Friends,
             I want to create a strored procedure that get parameters as table names and type of joins between them. and return a full query with including joins.
           
           
          Thanks
          Rahul Verma

          Jiyo cricket on Yahoo! India cricket
          Yahoo! Messenger Mobile Stay in touch with your buddies all the time.

          SPONSORED LINKS
          Sql queriesBasic programming languageC programming language
          Computer programming languagesThe c programming languageC++ programming language


          Win a BlackBerry device from O2 with Yahoo!. Enter now.


          Jiyo cricket on Yahoo! India cricket
          Yahoo! Messenger Mobile Stay in touch with your buddies all the time.

        Your message has been successfully submitted and would be delivered to recipients shortly.