Re: Use MySQL with Microsoft Office

2005-03-09 Thread Patrick Connolly
Somewhere about Wed, 09-Mar-2005 at 03:02PM +0100 (give or take), Jigal van 
Hemert wrote:

| From: Curtis Maurand
|  Using ODBC, however, you can link Access tables to MySQL tables and use
|  Access as the front end to MySQL.  It works very nicely.
| 
| Using ODBC you can access MySQL from OpenOffice.org (which has an
| Access-like frontend built in), using ODBC and MS Jet engine (standard with
| recent Windows versions) you can access and edit Access databases (*.mdb)
| with OpenOffice.org.

but only with Windoze, is it not?  I assume it's dependent on the OS
having the Jet engine.  I'd be very interested to know if anyone has
done an equivalent to that in Linux.




-- 
   ___ Patrick Connolly  
 {~._.~}   
 _( Y )_  Good judgment comes from experience 
(:_~*~_:) Experience comes from bad judgment
 (_)-(_)


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: LOAD DATA INFILE question...

2004-11-21 Thread Patrick Connolly
Somewhere about Sat, 20-Nov-2004 at 06:27PM +0100 (give or take), Ferhat BINGOL 
wrote:

| Hi,
| 

| I have a 72 fields data txt file and I was inserting all data
| previously but now I need only some of them to dump into the table.

| I would like to select only 4 fields which are the 1st, 5th,28th
| and 71st fields.

| Is there a statement to do that.
| 

I think it would be simpler to pre-process the file using cut with the
appropriate delmiter if it's not tab-delimited already.  Then import
the reduced file.

HTH

-- 
   ___ Patrick Connolly  
 {~._.~}   
 _( Y )_  Good judgment comes from experience 
(:_~*~_:) Experience comes from bad judgment
 (_)-(_)


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Still can't get a response from MySQL AB

2004-09-23 Thread Patrick Connolly
Last week, I asked this list had others had problems contacting MySQL
AB. I promptly received a short note from 

[EMAIL PROTECTED] 

It suggested I could respond to that address which I tried to do, but
I get this:

   - The following addresses had transient non-fatal errors -
[EMAIL PROTECTED]

That later became permanent.  For some unexplained reason, the name
server is timing out.  Something similar happened when I tried
replying to email from this address:

 [EMAIL PROTECTED]

.. except the message was that the address doesn't exist at all --
despite the fact that I'd received mail from it.  This isn't a man in
the middle attack of some kind is it -- or am I simply dead and don't
know it?

What could possibly explain why the mysql.com domain would have such a
problem when others don't?  I can't for the life of me see what's
different between what works and what doesn't.

I'd prefer not to do the correspondence through this list which
already has lots of traffic.

Ideas are most welcome.

Thanx

 --
   ___ Patrick Connolly  
 {~._.~}   
 _( Y )_  Good judgment comes from experience 
(:_~*~_:) Experience comes from bad judgment
 (_)-(_)


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Anyone else having trouble contacting MySQL AB?

2004-09-16 Thread Patrick Connolly
Somewhere about Mon, 13-Sep-2004 at 07:23PM +0300 (give or take), Egor Egorov wrote:

| Patrick Connolly [EMAIL PROTECTED] wrote:
| 
|  I've been trying to contact MySQL AB using the contact us link.  I
|  got a auto-response to the effect that I'd get a real reply in 2 days,
|  but that was a week ago.  My question was about a login that seems to
|  also go into a black hole.
|  
|  Has anyone else experienced similar?
| 
| Uncommon situation. Please try again.
| Which address you are writting to? 

Well, I've been at this for weeks now, and tried just about everything
I can think of short of turning up at the office.

I tried emailing the address I received my Order Number from, namely
[EMAIL PROTECTED]   That one bounced.

Then I tried logging on with the login and password I was given.  Not
recognised, so then I tried sending the email address the Order number
came to (not this one) on the off-chance I made a pasting error
getting the password into the browser.  That wasn't recognised, so I
still got nowwhere.

Next I tried the Contact Us link
(http://www.mysql.com/company/contact/) and that's the one that sent
me the autoresponse that promised to have a real reply which didn't
eventuate.  I even tried the login and password again, but ... (guess).

I'm beginning to feel like the character in Flan O'Brien's The Third
Policeman about someone who's been dead for 20 years and doesn't know
it.

I'm not really dead, am I?  Bummer that.  I was thinking of doing the
Certification exam before that happened.

It does seem ominous that others don't have the same experience.

-- 
   ___ Patrick Connolly  
 {~._.~}   
 _( Y )_  Good judgment comes from experience 
(:_~*~_:) Experience comes from bad judgment
 (_)-(_)


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Anyone else having trouble contacting MySQL AB?

2004-09-13 Thread Patrick Connolly
I've been trying to contact MySQL AB using the contact us link.  I
got a auto-response to the effect that I'd get a real reply in 2 days,
but that was a week ago.  My question was about a login that seems to
also go into a black hole.

Has anyone else experienced similar?


-- 
   ___ Patrick Connolly  
 {~._.~}   
 _( Y )_  Good judgment comes from experience 
(:_~*~_:) Experience comes from bad judgment
 (_)-(_)


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Getting rid of duplicates

2004-08-27 Thread Patrick Connolly
I read CSV files into a table using 

mysqlimport  --fields-terminated-by=',' --replace .

That would work fine and, by using the appropriate unique index, it
would deal with the fact that some of the data appears in multiple CSV
files.  However, though the same data is in several files, the date
format is not the same in all of them.  The result is that there are
duplicate records in the resulting table without violating unique
keys.

I devised a way of adding an additional column and converting the
dates into a proper date format thereby making the duplicates
detectable.  There are several ways I can get rid of them:

a) Write out the table using SELECT * DISTINCT INTO OUTFILE with the
appropriate GROUP BY.  Then truncate the table and read back from the
OUTFILE using LOAD DATA INFILE.

b) Create a new table with the same structure but with a slightly
different multiple-column unique key.  Use REPLACE INTO the new table
and the new key will remove the duplicates.  Truncate the original
table, and copy back to the records from the interim table.


There's a major hassle with method a).  The OUTFILE has to be removed
before the same file name can be used again and that requires access
privileges to the database directory.  I'm not entirely happy with
method b) either since it is not particularly scalable nor generic.

I'd have thought this would be an FAQ, but it appears not so from my
searching.  I normally work with a language called S (dialect R) which
handles matrices in a multitude of ways.  Removing duplicates is
straightforward in that language, but from what I know about SQL so
far, it is rather complicated in MySQL.


What do other people do with duplicates?

TIA

-- 
   ___ Patrick Connolly  
 {~._.~}   
 _( Y )_  Good judgment comes from experience 
(:_~*~_:) Experience comes from bad judgment
 (_)-(_)


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Errata in the Study Guide

2004-08-18 Thread Patrick Connolly
Somewhere about Tue, 10-Aug-2004 at 02:19PM +0200 (give or take), Carsten Pedersen 
wrote:

| Hi Patrick,
| 
| On Tue, 2004-08-10 at 12:16, Patrick Connolly wrote:
|  Is this the most appropriate list to mention misprints?  There doesn't
|  seem to be an indication where additional suggestions are to be sent.
| 
| This could be a good starting place if you want to discuss something in
| general - if you have specifics that are not already mentioned in the
| Certification Study Guide Errata -
| http://www.mysql.com/training/certification/studyguides/ - then please
| send them to [EMAIL PROTECTED]
| 
|  I found something that, though not exactly incorrect, works for
|  reasons other than what a reader might think, so it's misleading.
| 
| Posting your thinking to the list might be a good way to raise people's
| awareness of the issues involved. That is of course said with no
| knowledge of what kind of issues you have in mind :-)

I've now done that.

For anyone else who is interested to know, the errata list mentions
the answer to Question 8.6 (p291) wherein a WHERE statement seems to
be working with an alias when we know that wouldn't work.  In fact, it
works because the alias is only different from what it's aliasing by
virtue of its case.  Since column name matching is not case sensitive,
it's really the column name itself which is being referenced, and so
the query doesn't fall over.  A real alias would not match.

The answer to Question 5.12c (p178) is similarly misleading.


Best

-- 
   ___ Patrick Connolly  
 {~._.~}   
 _( Y )_  Good judgment comes from experience 
(:_~*~_:) Experience comes from bad judgment
 (_)-(_)


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Errata in the Study Guide

2004-08-10 Thread Patrick Connolly
Is this the most appropriate list to mention misprints?  There doesn't
seem to be an indication where additional suggestions are to be sent.

I found something that, though not exactly incorrect, works for
reasons other than what a reader might think, so it's misleading.



-- 
   ___ Patrick Connolly  
 {~._.~}   
 _( Y )_  Good judgment comes from experience 
(:_~*~_:) Experience comes from bad judgment
 (_)-(_)


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Specifying table with mysqlimport

2004-08-09 Thread Patrick Connolly
I have a bunch of CSV files that I wish to import into a table.  I can
do that with LOAD DATA INFILE INTO TABLE ..

but there's a bunch of them with different names (naturally) and I
wish to do them in one go.  From my understanding, there is no way to
specify the table since it is inferred from the name of the file.

Is there a smarter way to deal with this than making a shell script
that copies the CSV files in turn to a name that matches the table I
wish to add data to, and then use that name in a loop?

If my table is Bank, this will work:

for i in *CSV; do cp $i Bank.CSV; 
mysqlimport --fields-terminated-by=',' --ignore-lines=1 db_name Bank.CSV; 
done

Something tells me that greater minds have a better way.


-- 
   ___ Patrick Connolly  
 {~._.~}   
 _( Y )_  Good judgment comes from experience 
(:_~*~_:) Experience comes from bad judgment
 (_)-(_)


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: LOAD DATA INFILE insists on being LOCAL

2004-08-02 Thread Patrick Connolly
Somewhere about Sun, 01-Aug-2004 at 11:31AM -0400 (give or take), Michael Stassen 
wrote:

| 
| Patrick Connolly wrote:

[...]

|  Looks to me the mysql user should have no trouble with it:
|  
|  -rw-rw-r--1 pat  pat   332 Jun 28 20:42 Orders.txt
| 
| Every piece of the path to this file must be executable by mysql, as well.

I think that's the main problem I have.  Since it's in a directory
beginning with /home/ and that directory is rwx--, one would have
to change that far back.  Since this machine is not used by anyone
else, perhaps it would not be a problem changing that.  Is that what
people normally do?  Anything else I can think of seems incredibly
complicated.


| 
|  | : Also, to use LOAD DATA INFILE on server files, you must have
|  | : the FILE privilege. See section 5.5.3 Privileges Provided by MySQL.
|  
|  Think we can count that one out as the problem since LOCAL which would
|  have the same requirement does work.
| 
| The FILE privilege is not required with LOCAL.  It is required without 
| LOCAL, and for SELECT INTO OUTFILE.  My bet would be that you don't have the 
| FILE privilege.  You can check with

Good guess.  That was part of the problem (though I'd not have guessed
from the error message).  I forgot that GRANT ALL does not include
FILE.

[...]

| How LOAD DATA LOCAL works was changed in 3.23.49 and 4.0.2.  This
| is documented here
| http://dev.mysql.com/doc/mysql/en/LOAD_DATA_LOCAL.html.

I had read that, but I'd not made the connexion with the error message.

Thanks again.

best

-- 
   ___ Patrick Connolly  
 {~._.~}   
 _( Y )_  Good judgment comes from experience 
(:_~*~_:) Experience comes from bad judgment
 (_)-(_)


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: LOAD DATA INFILE insists on being LOCAL

2004-08-01 Thread Patrick Connolly
Somewhere about Sat, 31-Jul-2004 at 11:17AM -0400 (give or take), Michael Stassen 
wrote:

| With LOCAL, the *client* reads the file on the client's machine.
| Without LOCAL, the *server* reeads the file on the server's
| machine.  Even though the client and server machines are the same
| in your case, those are still different operations.  There are
| restrictions on having the server do the work, for good reason.
| This is documented in the manual
| http://dev.mysql.com/doc/mysql/en/LOAD_DATA.html:

I'm pretty sure I understand the reasons.

| : For security reasons, when reading text files located on the server,
| : the files must either reside in the database directory or be readable
| : by all.  

Looks to me the mysql user should have no trouble with it:

-rw-rw-r--1 pat  pat   332 Jun 28 20:42 Orders.txt


| : Also, to use LOAD DATA INFILE on server files, you must have
| : the FILE privilege. See section 5.5.3 Privileges Provided by MySQL.

Think we can count that one out as the problem since LOCAL which would
have the same requirement does work.

I can't be absolutely sure but I seem to remember I did not have this
problem when I used 3.23.47 before I 'rpm -U'ed to 4.0.18.  With the
Redhat distro version, I could *not* use LOAD DATA LOCAL unless I
started the client with --local-infile[=1] which seems to fit my
understanding of the docs.  With 4.0.18, it's unnecessary which was
another surprise to me.  Is there something I'm missing here?


| 
| Michael

Thanks Michael.


-- 
   ___ Patrick Connolly  
 {~._.~}   
 _( Y )_  Good judgment comes from experience 
(:_~*~_:) Experience comes from bad judgment
 (_)-(_)


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



LOAD DATA INFILE insists on being LOCAL

2004-07-31 Thread Patrick Connolly
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 5 to server version: 4.0.18-standard

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql 
mysql LOAD DATA  INFILE Orders.txt INTO TABLE Orders3 fields terminated by '\t';
ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: NO)

Even thought the server is on the same machine as the host, I always
get this error message if I try .

If I add the word LOCAL, it is quite happy even though I know it
shouldn't be necessary.

That hasn't bothered me very much, but now I'm working on Chapter 9 of
the Certification Study Guide which covers this topic, and the related
SELECT INTO OUTFILE, I don't have a work around.  

I'm using Redhat 7.3 with the mysql RPMs from the MySQL site, not the
ones that came with the distro.  So far, everything else seems to work
properly, but I'm mystified why this should happen.

Somehow, I doubt that anyone will be able to replicate this problem,
so that makes it unlikely anyone will have an answer, but one can't be
sure.  At one stage I thought it might be an obscure hardware
difficulty with this aged machine (over 5 years) because of another
obscure problem I had using fetchmail from a POP server.  However, I
noticed that once I switched off the ISP's virus checking, that
problem vanished, so I'm less inclined to believe it's hardware.

Any wild guesses welcome.

TIA

-- 
   ___ Patrick Connolly  
 {~._.~}   
 _( Y )_  Good judgment comes from experience 
(:_~*~_:) Experience comes from bad judgment
 (_)-(_)


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]