Closed Thread
Results 1 to 1 of 1

Multiple joins in SQL statement in excel VBA.

  1. #1
    abhay_547
    Guest

    Multiple joins in SQL statement in excel VBA.

    Hi All,

    I have created a excel userform which pulls the data from sql server table on the basis of the parameters selected on the userform.
    Following are the details of the same.

    1) Mydata - Table which contains the data which I want to pull.
    2) Country_Region Mapping - Table to populate listbox1 with country column from this table and used as a criteria in sql statment for pulling data from Mydata table.
    3) Cost Element Mapping - Table to populate listbox2 with FSI_LINE3_code column from this table and used as a criteria in sql statment for pulling data from Mydata table.
    4) Cost Center Mapping - Table to populate listbox4 with Sub Product UBR Code column from this table and used as a criteria in sql statment for pulling data from Mydata table.

    Following is the code which I have as of now. Basically there are three joins required in the sql statement.

    Join 1 :
    Code:

    Please Login or Register  to view this content.
    Join 2 :
    Code:

    Please Login or Register  to view this content.
    Join 3 :
    Code:

    Please Login or Register  to view this content.
    Below is the code which I have so far in my Userform background which works fine with the first join. I have bolded \ highlighted the sql statment in which I need help to incorporate other two joins and get the data from mydata on the basis of that :

    Code:

    Please Login or Register  to view this content.

    Thanks a lot for your help in advance.
    Last edited by abhay_547; 06-06-2010 at 01:06 AM.

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1