PDA

View Full Version : Sleeper: SQL and Excel



EricM
04-20-2005, 12:16 PM
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.

Paleo
04-20-2005, 02:32 PM
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=;Databas e=my-database;Uid=username;Pwd=password;"



ODBC 3.51 Local database:


"DRIVER={MySQL ODBC 3.51 Driver};SERVER=localhost;DATABASE=myDatabase;USER=myUsername;PASSWORD=myPas sword;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"