Re: order of items in a WHERE...IN clause

2008-07-28 Thread Gary Josack
Andrew Martin wrote: Hello, Is it permissible to order a clause such that the search term is the first item (in the clause)? standard: field1 IN (123, 654, 789) in question: 123 IN (field1, field2, field3) I am interested to know if the optimizer treats this any differently if anybody can she

Re: secure host and user name for non static ip address

2007-10-09 Thread Gary Josack
Sign up for dyndns.com or some other similiar service. Create permissions to the domain and run a script that updates you IP with dyndns whenever it changes. (such scripts already exist). As far as "'username'@'%' with no password with SELECT, INSERT, UPDATE and DELETE privileges"... worst ide

Re: funky characters in columns

2007-10-01 Thread Gary Josack
Try: replace(replace(dealerLong, '\n', ''), '\r', '') Jay Blanchard wrote: I did some googleing and some other searching, now I am looking for a cure all. I have a column into which it appears that a carriage return has been inserted and it is mucking about with some queries; mysql> select dea

Re: Ouch! ibdata files deleted. Why no catastrophe?

2007-09-25 Thread Gary Josack
For future reference. The files do actually continue to be written to. I experience this all the time when people delete logs files and space keeps filling up. Daniel Kasak wrote: On Tue, 2007-09-25 at 23:11 -0400, Gary Josack wrote: Well if you can stop all instances of writes to the

Re: Ouch! ibdata files deleted. Why no catastrophe?

2007-09-25 Thread Gary Josack
immediately. As soon as you restart mysql those files are gone forever. Daniel Kasak wrote: On Tue, 2007-09-25 at 19:27 -0400, Gary Josack wrote: Did the space become available when deleted? try: lsof | grep deleted see if they're still running in memory. if so you might be able to

Re: Ouch! ibdata files deleted. Why no catastrophe?

2007-09-25 Thread Gary Josack
Did the space become available when deleted? try: lsof | grep deleted see if they're still running in memory. if so you might be able to save them. Daniel Kasak wrote: Greetings. I've just returned from holidays, and it seems that all but 1 ibdata file ( there were 10! ) have been deleted b

Re: Finding empty feilds

2007-09-22 Thread Gary Josack
ng the CreateDate timestamp. For future reference what is the difference between = and is if I may ask. Thanks. -Original Message- From: Gary Josack [mailto:[EMAIL PROTECTED] Sent: Saturday, September 22, 2007 1:20 PM To: Stephen Sunderlin Cc: mysql@lists.mysql.com Subject: Re: Findi

Re: Finding empty feilds

2007-09-22 Thread Gary Josack
Stephen Sunderlin wrote: I executed an insert...select and some empty fields were inserted into a table. I'm trying to delete these empty fields but a look up for: FIELD = '' FIELD = 'null' FIELD = '0' FIELD = '[SPACE]' Returns nothing. What should I be looking for to delete these empty f

Re: Editing fields in bulk

2007-09-04 Thread Gary Josack
Brian Dunning wrote: I have a column where I need to replace all instances of the text "US-Complete" (contained within a long sentence) with "US Complete". There are probably 50 or 100 of them. I'm really scared to do it since I can't risk screwing up that column - what's the correct syntax?

Re: Database architecture and security

2007-08-23 Thread Gary Josack
I'd never have a separate database for everyone or even a separate table for everyone. Here's a rough idea of how I'd do it mysql> CREATE TABLE customer ( -> `custid` INT NOT NULL AUTO_INCREMENT, -> `lastname` VARCHAR(25) not null, -> `firstname` VARCHAR(25) NOT NULL, -> PRIMARY KEY(

Re: New Value From Concatenated Values?

2007-08-18 Thread Gary Josack
Kebbel, John wrote: Is there a way to update a table so that a column's values can be changed to a concatenation of two other column values? For instance, something like ... UPDATE TABLE tablename SET colA = colB.colC; Is this what you're looking for? mysql> create table concattest (

Re: recommend a good database book

2007-08-13 Thread Gary Josack
Jonathan Horne wrote: i finally have a real need that i need to sit down and learn the basics of databases. i need to learn to create a database that i can use to track assets at my company, and have it be readable/updatable from a web interface (and hopefully also export data to .csv). can

Re: Find record between 10 minutes

2007-08-13 Thread Gary Josack
[EMAIL PROTECTED] wrote: Hi, I have a table with records dated 01-01-2007 00:00:00 to 01-02-2007 23:59:59. What I want to do is grab 1 random record in every 10 minutes between the date. Please help me. Regards, Willy Does it really need to be random? This works from me: mysql> select `da

Re: Import file into MySQL Database..

2007-08-08 Thread Gary Josack
this added into the table: A. DREW | Last | Add1 | Add2 | City | State | Zip | Date | Xcode | Reason Which is a combination of the first address and the column names. On Aug 8, 2007, at 3:34 PM, Gary Josack wrote: Jason Pruim wrote: Okay, so I have been going crazy trying to figure

Re: Import file into MySQL Database..

2007-08-08 Thread Gary Josack
Jason Pruim wrote: Okay, so I have been going crazy trying to figure this out... All I want to do is load a excel file (Which I can convert to just about anything) into a MySQL database... Should be easy right? Here is the command that I have tried: LOAD DATA LOCAL INFILE '/volumes/raider/A

Re: Returning All Rows That Repeat

2007-07-29 Thread Gary Josack
John Kopanas wrote: Does it makes sense that on a table of 100,000 rows that my DB is crapping out with the following query? SELECT * FROM jobs GROUP BY customer_number, job_number HAVING count(*) > 1 ORDER BY customer_number; :-) On 7/29/07, John Trammell <[EMAIL PROTECTED]> wrote: From:

Re: Returning All Rows That Repeat

2007-07-29 Thread Gary Josack
John Kopanas wrote: I want to be able to return all rows that have one or more other rows with the same customer_number and job_number. So for instance. If their are two jobs in my jobs table with a customer_number = '0123' and job_number ='12' then I want both of those jobs to return one right

Re: mysql dump help!

2007-07-24 Thread Gary Josack
Red Hope wrote: I'm curious about one thing. When I go into MySQL folder on the hard drive. I go into the 'bin' folder, should there be an .exe program called mysqldump? or not? Lillian --- Carlos Proal <[EMAIL PROTECTED]> wrote: Yep, good for you, welcome to the "real" world You are chan

Re: innodb to be removed? and...

2007-07-24 Thread Gary Josack
Christian Parpart wrote: Hi all, recently someone said to know alot about mysql told us that InnoDB is about to be removed from the mySQL server. however, InnoDB seems to be the fastest storage engine in our case, as myisam take a hell longer to insert new rows e.g. so is it true, that inno

Re: SQL LINKING TABLE Command

2007-07-16 Thread Gary Josack
Thufir wrote: SELECT product_name, customer.name, date_of_sale FROM `sales` , product, customer WHERE product.product_id = sales.product_id and customer.customer_id = sales.customer_id LIMIT 0, 30 The above SQL command links three tables and display the required result. The tables are linked by