Re: Select Unique?

2005-12-12 Thread John Mistler
? Thanks, John On Dec 12, 2005, at 9:57 AM, Michael Stassen wrote: Rhino wrote: - Original Message - From: "John Mistler" <[EMAIL PROTECTED]> To: Sent: Monday, December 12, 2005 12:34 AM Subject: Select Unique? I have two tables 'table1', 'table2&#x

Re: Import Table?

2005-12-12 Thread John Mistler
Street, Adelaide 5000 Australia +61 8 8408 4273 - Work +61 417 268 665 - Mobile +61 8 8408 4259 - Fax -Original Message- From: John Mistler [mailto:[EMAIL PROTECTED] Sent: Monday, 12 December 2005 1:30 PM To: Logan, David (SST - Adelaide) Subject: Re: Import Table? Aha, that's i

Re: Select Unique?

2005-12-12 Thread John Mistler
wrote: - Original Message - From: "John Mistler" <[EMAIL PROTECTED]> To: Sent: Monday, December 12, 2005 12:34 AM Subject: Select Unique? I have two tables 'table1', 'table2' with a matching column 'column1'. How can I return all rows from table

Select Unique?

2005-12-11 Thread John Mistler
I have two tables 'table1', 'table2' with a matching column 'column1'. How can I return all rows from table2 where the entry for table2.column1 does not match any entries in table1.column1? SELECT * FROM table2 WHERE table2.column1 <> table1.column1 returns all the rows, rather than the uniqu

Re: Import Table?

2005-12-11 Thread John Mistler
Frome Street, Adelaide 5000 Australia +61 8 8408 4273 - Work +61 417 268 665 - Mobile +61 8 8408 4259 - Fax -Original Message----- From: John Mistler [mailto:[EMAIL PROTECTED] Sent: Monday, 12 December 2005 11:55 AM To: mysql@lists.mysql.com Subject: Import Table? Is there a command that will l

Import Table?

2005-12-11 Thread John Mistler
Is there a command that will load in all of the data from a table within a database ".sql" file on disk? The only import option I am seeing is "LOAD DATA INFILE" which requires a text file already exported to disk. How about a way to load in the table data directly from the database file? T

Query help

2004-10-15 Thread John Mistler
I need help coming up with the following query: My table: +-+--+ | rowID | dateOfPurchase | +-+--+ | 1 | '2004-1-17 08:00:00' | +-+--+ | 4 | '2004-1-17 08:03:20' | +

LATEST_DATE

2004-10-15 Thread John Mistler
Is there a function that will return the latest date from a datetime column? something like LATEST_DATE(theColumn) --> "2004-10-15 15:17:00" Thanks, John -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Copy table?

2004-10-15 Thread John Mistler
Is there a way to make an exact copy of a table and give the copy a new name? Thanks, John -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Enforce value on select

2004-10-10 Thread John Mistler
ld have the value 0, > then I wonder why there isn't a row with rowID=5 and value=0. If it's just > a matter of treating non-existent rows as having 0 value in your app, why > don't you simply code that into your app? In other words, I find it hard to > provide a solution, b

Re: Enforce value on select

2004-10-10 Thread John Mistler
ther ideas? SELECT nameColumn from theDatabase WHERE rowID = 5; (when no row has ID "5") result --> empty set (I want a value like '0' or something) Thanks again! -John on 10/10/04 8:12 PM, liang lei at [EMAIL PROTECTED] wrote: > --- John Mistler <[EMAIL PROTECTED]

Enforce value on select

2004-10-10 Thread John Mistler
Is there a way to force SOME value to be returned from a SELECT query when the result is empty set? For instance: SELECT nameColumn from theDatabase WHERE rowID = 5; (when no row has ID "5") result --> empty set I would like for it to return some value, such as '' or 0 . . . Thanks, John -

Simple query question

2004-09-20 Thread John Mistler
I have a table in which the first column is either 1 or 0. The second column is a number between 0 and 59. I need to perform a query that returns entries where: 1. IF the first column is 1, the second column is NOT 0 2. IF the first column is 0, the second column is anything. It seems simple, b

Re: UPDATE string segment?

2004-09-01 Thread John Mistler
ckenberg at [EMAIL PROTECTED] wrote: > You can use the replace string function: > > update table set > file_path=replace(file_path,'aFolder','aFolder/aChildFolder'); > > In each update aFolder will be replaced by the new path. > > John Mistler wrote: &

UPDATE string segment?

2004-09-01 Thread John Mistler
I have a column that holds hard disk file location info such as: "/Volumes/External HD/aFolder/aFile.pdf" "/Volumes/External HD/aFolder/anotherFile.pdf" etc. . . (many files located in the same folder) Can anyone suggest a single statement (or multiple) that would update every file location locate

OS X Embedded Server

2004-08-16 Thread John Mistler
I have written an application for MAC OS X.3 that interfaces with MySQL through the Client/Server approach. I would like to simplify the installation process of the application by using the embedded MySQL server instead. However, I am having trouble figuring out how to: 1. Include the MySQL embe

Re: DBF to MySQL

2004-07-08 Thread John Mistler
port them (search freshmeat.net for 'dbf'). > > If you need more info, holler. > > j- k- > > On Tuesday 06 July 2004 07:55 pm, John Mistler said something like: >> For some reason, the imported information showed up as garbled nonsense. >> The file

Re: INSERT DISTINCT?

2004-07-07 Thread John Mistler
discussed below. Any one know? Thanks, John on 7/7/04 2:21 PM, Joshua J. Kugler at [EMAIL PROTECTED] wrote: > Certainly, it's called making a unique index on the field(s) you want to keep > unique. > > Hope that helps. > > j- k- > > On Wednesday 07 July 200

INSERT DISTINCT?

2004-07-07 Thread John Mistler
Is there a way to do an INSERT on a table only if no row already exists with the same info for one or more of the columns as the row to be inserted? That is, without using a method outside SQL? Thanks, John -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubs

Re: DBF to MySQL

2004-07-06 Thread John Mistler
illermo at [EMAIL PROTECTED] wrote: > Try, for example: > > LOAD DATA INFILE 'myfile.cdf' INTO TABLE mytable > FIELDS TERMINATED BY ',' ENCLOSED BY '"' > LINES TERMINATED BY '\n'; > > > -Mensaje original- > De: John

DBF to MySQL

2004-07-06 Thread John Mistler
I am wanting to parse the info in a .dbf file (or .xls file for that matter) and place it in a table in a MySQL database. Is this something that I can do with the server side MySQL application, or do I need to figure out a way to do it on the client side? Any description of the method would be ve

Re: Select compare to current date

2004-06-28 Thread John Mistler
This one I can help you with: SELECT year-field FROM table WHERE YEAR(year-field) <= YEAR(CURDATE()); - John on 6/28/04 4:49 PM, Robb Kerr at [EMAIL PROTECTED] wrote: > Need help with a SQL Select statement. I've got a table that consists of a > > list of years (1930-2014). I need to create a

Re: SQL challenge

2004-06-28 Thread John Mistler
erage calculation. 2. The average time elapsed between REPEATED instances of the rowID PER WEEK between one month ago and now. (This one might be as easy as using the WEEK() function as before . . .) Thanks, - John on 6/28/04 2:37 AM, Roger Baklund at [EMAIL PROTECTED] wrote: > * John Mistler >

SQL challenge

2004-06-28 Thread John Mistler
O.K. you SQL gurus-- I have a difficult query for you that has me stumped. The table has two columns: rowID (MEDIUMINT-but *NOT* AUTO_INCREMENT) and theDate (DATETIME). I need it to find: 1. The COUNT of REPEATED instances of the rowID in the last month. - so if there are 5 rows with the same r

Re: COPY row?

2004-06-11 Thread John Mistler
t the SELECT statement correct *first* then prepend the INSERT clause to > it so that those result rows end up as new rows in your table. Your > destination table has an auto-incrementing ID column. You should not insert > values to that column (yes, you can under certain circumstances but th

COPY row?

2004-06-10 Thread John Mistler
Is there a COPY row or DUPLICATE row command? I would like to duplicate a row with in a table with 38 columns (auto-incrementing the Primary Key on the copied row, of course) and then alter the entry in ONE of its columns. Can this be done without doing a SELECT, then INSERT, then UPDATE? Thanks,

Re: Error on Outfile

2004-06-02 Thread John Mistler
I just encountered this yesterday on my Macintosh, and it turned out that user "mysql" did not have permission to write to the destination folder. I simply had to change the permissions on that folder to include Read & Write access to user "mysql". -John on 6/1/04 8:09 PM, [EMAIL PROTECTED] at [

Re: INTO OUTFILE error

2004-06-01 Thread John Mistler
Would there be any obvious reasons for its inability to access the desktop? I have used that desktop directory many times before in UNIX. Thanks, John on 6/1/04 12:49 AM, Egor Egorov at [EMAIL PROTECTED] wrote: > John Mistler <[EMAIL PROTECTED]> wrote: >> Can anyone guess why I

INTO OUTFILE error

2004-05-31 Thread John Mistler
Can anyone guess why I am getting this error: "ERROR 1: Can't create/write to file '/Users/johnmistler/Desktop/TestFile.txt' (ERRCODE 13)" when using this statement: mysql> SELECT * INTO OUTFILE '/Users/johnmistler/Desktop/TestFile.txt' FROM theTable WHERE column1 != 'thisString'; ? I am loggi

"Batch" Update?

2004-05-28 Thread John Mistler
Let's say I have a table "A" with 25 columns. I also have an identical table "B" with 25 columns (column names, indexes, everything the same). I want to get the entry of column 2 of every row of table "B", and update column 2 of every row of table "A" WHERE the rowID from table "A" matches the ro

DATETIME question

2004-05-25 Thread John Mistler
Given a column DATETIMEcolumn (-MM-DD HH:MM:SS), is there a SELECT statement that will: select all entries whose (TIME) of DATETIMEcolumn is BETWEEN 'HH:MM:SS' AND 'HH:MM:SS', but whose (DATE) is anything? Thanks, John -- MySQL General Mailing List For list archives: http://lists.mysql.co

Re: Mac Developer Question

2004-05-22 Thread John Mistler
22/04 12:01 PM, Hassan Schroeder at [EMAIL PROTECTED] wrote: > John Mistler wrote: > >> I'm having trouble getting this line to work. I have tried: >> >> kill `cat /usr/local/mysql/bin/mysql/data/localhost.pid` >> -> Not a directory >> kill `cat /usr/l

Re: Mac Developer Question

2004-05-22 Thread John Mistler
al/mysql./bin/mysqld_safe" on 5/22/04 7:52 AM, Paul Bingman at [EMAIL PROTECTED] wrote: > On Sat, 22 May 2004, John Mistler wrote: > >> do shell script "kill cat /usr/local/mysql/bin/mysql/data/localhost.pid" > > The kill command takes a numeric PID as its argument.

Mac Developer Question

2004-05-22 Thread John Mistler
A couple of questions for any Mac users willing to help: I have created an application for OS X.3 that talks to the MySQL server with shell commands. In order for those commands to work, I have to include a proper username and password to access the MySQL database designated for my app within the

Re: SELECT almost every column

2004-05-14 Thread John Mistler
PM, Justin Swanhart at [EMAIL PROTECTED] wrote: > --- John Mistler <[EMAIL PROTECTED]> wrote: >> Is there a SELECT statement, if I have a table with >> 50 columns, to select >> every column EXCEPT the last one? Can I do this >> without typing the name of >> all

SELECT almost every column

2004-05-14 Thread John Mistler
Is there a SELECT statement, if I have a table with 50 columns, to select every column EXCEPT the last one? Can I do this without typing the name of all 49 columns? If so, then what if I want to exclude the last TWO columns? Thanks, John -- MySQL General Mailing List For list archives: http:

Re: Distributing mySQL

2004-05-02 Thread John Mistler
I'm glad you brought this up, because I am trying to figure out the same thing. I have created an application for OS 10.3 which stores its data in a MySQL database. I would like to be able to install the app on other computers from a CD, without having to set up MySQL separately on each computer.

Re: Another Trailing Spaces Issue

2004-05-02 Thread John Mistler
d" entries with "trailing spaces" in them. If you're > not using 4.0.17, what you're seeing IS a bug and should be reported if > it hasn't already been. > > > Matt > > > - Original Message - > From: "John Mistler" > Se

Indexing

2004-05-01 Thread John Mistler
I know this is an elementary question, but I am getting two sets of instructions from different MySQL manuals about setting an index on a prefix of a column of a table. One says to use: KEY indexName (colName(length)) and the other says to use INDEX indexName (colName(length)) Are both all rig

Another Trailing Spaces Issue

2004-04-30 Thread John Mistler
me effect. :-) > > Hope that helps. > > > Matt > > > - Original Message - > From: "John Mistler" > Sent: Friday, April 30, 2004 3:54 AM > Subject: Storing a space > > >> Is there a way to force an invisible "space" characte

Storing a space

2004-04-30 Thread John Mistler
Is there a way to force an invisible "space" character to be stored at the END of a string in a column (either VARCHAR or CHAR), so that when it is retrieved the space at the end is not cut off? theString + space or even, theString + space + space + space, etc. Currently, I can only get the str

Escape characters

2004-04-21 Thread John Mistler
When issuing commands through the terminal (in Mac OS 10.3) to MySQL, I understand that if you surround a variable with "\\`" it will allow for characters such as - and space. Will it also allow for all other non-alphanumeric characters such as / and * and >, etc.? Thanks, John -- MySQL Gener

Re: SELECT duplicate rows

2004-04-21 Thread John Mistler
same primary key (you *do* have primary keys on > your table, don't you?). If you don't add one for this excercise. > > j- k----- > > On Tuesday 20 April 2004 11:22 pm, John Mistler said something like: >> Is there a way to use a SELECT statement (or any other

SELECT duplicate rows

2004-04-21 Thread John Mistler
Is there a way to use a SELECT statement (or any other, for that matter) that will look at every table in a database and return every row whose first 3 columns are duplicated in at least one other row in any of the tables? Essentially, a command to find duplicate entries in the database . . . Than

Re: Panther

2004-04-14 Thread John Mistler
This was the answer for my installaton on Panther, as well. Scott's instructions provide those extra commands you might need. I thought I had followed the standard installation instructions VERY carefully, and yet I got stuck. This got me through . . . . on 4/14/04 12:26 AM, Daniel Lahey at [EM

Re: Trying to understand the license

2004-04-09 Thread John Mistler
I thought I read that if your app is not GPL and interacts with MySQL in any way, you must license MySQL. on 4/9/04 5:16 PM, Dan Bowkley at [EMAIL PROTECTED] wrote: > Exactly. The license only becomes an issue when you distribute mysql > itself. Essentially, the gist is you can't charge people

Re: Uninstall MySQL for Panther?

2004-03-12 Thread John Mistler
s still think I need to tough it out, what is the next step? Once again (embarrassingly) -- THANK YOU! John on 3/12/04 7:22 PM, Paul DuBois at [EMAIL PROTECTED] wrote: > At 18:33 -0800 3/12/04, John Mistler wrote: >> I am two days into troubleshooting this. I need some help badly.

Uninstall MySQL for Panther?

2004-03-12 Thread John Mistler
I am two days into troubleshooting this. I need some help badly. I installed MySQL 4.0.18 for Mac. I was able to get in at first: Welcome to MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 14 to server version: 4.0.18-standard then I would type mysql> create database myt