+ Reply to Thread
Results 1 to 7 of 7

Join condition not working in VBA

  1. #1
    Registered User
    Join Date
    06-17-2012
    Location
    UNITED STATES
    MS-Off Ver
    Excel 2010
    Posts
    29

    Join condition not working in VBA

    Hello everyone,

    I am putting one join condition to retreive data from oracle database using VBA. But getting syntax error (compiled error).
    Can anyone help me to check. Without putting join condition, I am getting data.
    Is there any URL where I can learn about SQL VBA to know the rules and process.



    Please Login or Register  to view this content.

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Join condition not working in VBA

    you can't use a line continuation character in the middle of a string so this
    Please Login or Register  to view this content.
    needs to be
    Please Login or Register  to view this content.
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Registered User
    Join Date
    06-17-2012
    Location
    UNITED STATES
    MS-Off Ver
    Excel 2010
    Posts
    29

    Re: Join condition not working in VBA

    Thanks joseph.. As I am using SQL for first time in VBA, I am asking this type of question.

    i) In my database, I want to use join for around 10 tables. In that case, what should be my approach. If I will not use line continuation then the code will be too lengthy.Can I use the same code like below.
    ii)Also if I use outer join, whether can I use (+) like below or outer join keyword ...
    iii) If I search for a single keyword( like m.marketing ='CTS' ), then can I use single quote(')

    Please Login or Register  to view this content.
    Advance thanks
    Last edited by cruise.alter; 07-07-2012 at 12:30 PM.

  4. #4
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Join condition not working in VBA

    I didn't say you couldn't use them I just said you couldn't put them in the middle of a string. you need to concatenate the strings as I showed

  5. #5
    Registered User
    Join Date
    07-19-2012
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    25

    Re: Join condition not working in VBA

    I think there's problem with string I didn't get proper result. plz help me out ..

  6. #6
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Join condition not working in VBA

    start your own question please

  7. #7
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Join condition not working in VBA

    Hello James Donovan.

    Unfortunately you have inadvertently broken one of the forum rules. Please read the following and make the necessary change. Thanks.

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread. It makes sense to have a new thread for your question because a thread with numerous replies can be off putting & difficult to pick out relevant replies.

+ Reply to 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