Consulting

Results 1 to 2 of 2

Thread: Sleeper: SQL and Excel

  1. #1

    Sleeper: SQL and Excel

    I am wanting to connect to a mysql database (ecr) query table computer changes and only pull information that has the string software in it. But the trick is I want to ignore any fields that have Microsoft in them if possible. Then I would like to drop it into a excel spreadsheet. Is this possible.

  2. #2
    Administrator
    VP-Knowledge Base
    VBAX Master
    Joined
    Jan 2005
    Location
    Porto Alegre - RS - Brasil
    Posts
    1,219
    Location
    Hi Eric,

    to connect use one out of these strings:

    • ODBC 2.50 Local database:


    "Driver={mySQL};Server=localhost;Option=16834;Database=mydatabase;"



    • ODBC 2.50 Remote database:

    "Driver={mySQL};Server=data.domain.com;Port=3306;Option=131072;Stmt=;Database=my-database;Uid=username;Pwd=password;"

    • ODBC 3.51 Local database:

    "DRIVER={MySQL ODBC 3.51 Driver};SERVER=localhost;DATABASE=myDatabase;USER=myUsername;PASSWORD=myPassword;OPTION=3;"

    • ODBC 3.51 Remote database:

    "DRIVER={MySQL ODBC 3.51 Driver};SERVER=data.domain.com;PORT=3306;DATABASE=myDatabase; USER=myUsername;PASSWORD=myPassword;OPTION=3;"
    To colect data use this SQL statement: (for example)


    SELECT * FROM table WHERE field <> LIKE "Microsoft"
    Best Regards,

    Carlos Paleo.

    To every problem there is a solution, even if I dont know it, so this posting is provided "AS IS" with no warranties.

    If Debugging is harder than writing a program and your code is as good as you can possibly make
    it, then by definition you're not smart enough to debug it.




    http://www.mugrs.org

Posting Permissions

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