Results 1 to 3 of 3

Thread: Error join, acces ,sql...

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Newbie
    Joined
    Dec 2016
    Posts
    3
    Location

    Error join, acces ,sql...

    Hi everyone...

    I have a table in memory ,name table1 and i want to open another database with same table name (table1) and also insert from table in memory records that dont exist in the external database. Records find with TEL_NUM_FACTURA that don't exist.
    What i done is next:


    connStr = "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=" & strpath
    Set objConn = CreateObject("ADODB.Connection")
    objConn.Open connStr
    Dim dbs As Database
    Dim cadena As String
    cadena = "SELECT [tabla1].TEL_NUM_FACTURA, [tabla1].TEL_NU_TELEFONO, [tabla1].TEL_NU_EXTENSION, [tabla1].TEL_PRO_CARGOS, [tabla1].TEL_SUMA_TOTAL, [tabla1].TEL_DTO_PLAN, [tabla1].TEL_DTO_CLIENTE FROM [tabla1] LEFT JOIN tabla1 ON [tabla1].[TEL_NUM_FACTURA] = tabla1.[TEL_NUM_FACTURA] WHERE (((tabla1.TEL_NUM_FACTURA) Is Null));"
    Set dbs = objConn.Execute(cadena)
    dbs.Close
    Set rs = Nothing
    Set objConn = Nothing


    Before insert into y have problems with join... and i don't know how to solve it.
    Does anybody can help me?

    And happy new year...

    Thanks!
    Last edited by Aussiebear; 02-08-2025 at 05:28 PM.

Posting Permissions

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