pkgadd error

2006-09-20 Thread zehra cagnan
Hi all, I am trying to install mysql-standard-5.0.24. My OS is Sun Solaris 9. I down loaded the binary package mysql-standard-5.0.24-solaris9-sparc.pkg.gz from your web site. I can unzip the file with no problem using gunzip. The file is at /var/spool/pkg. While in this directory I am typing the c

Conditional copy of values

2006-09-20 Thread Ravi Kumar.
Dear All, I have 2 tables Table1 and Table2. In Table1 rowid is primary key and in Table2 rowid is primary key as well as foreign key (referring to rowid in Table1). There are several other columns in Table1, but Table2 has only one col - rowid. I want to insert rowid into Table2 conditionall

Re: Null !?

2006-09-20 Thread Visolve DB Team
hi, You can use DBNull. DBNull - First it returns true if such a value is null, then converts the value to an empty string if it is null. For instance, If dbval Is DBNull.value then return "" End If Thanks ViSolve DB Team. - Original Message - From: "Roberto William Aranda-W Roma

Re: Difficult query

2006-09-20 Thread Chris
Neil Tompkins wrote: Hi I've the following tables (holds a list of companies) TableName:Company CompanyID (int) CompanyName (varchar) (holds a list of areas) TableName:Area AreaID (int) AreaName (varchar) (holds a list of what areas are near to what companies), TableName:AreaCompany

Re: How to delete all rows....

2006-09-20 Thread Chris
Wagner, Chris (GEAE, CBTS) wrote: But how will that interact with the auto increment counter? Will truncate reset the counter. According to the docs it will: http://dev.mysql.com/doc/refman/5.1/en/truncate.html The table handler does not remember the last used AUTO_INCREMENT value, but star

Re: Question about LOTS of indexes on a table

2006-09-20 Thread Peter Brawley
Peter >It doesn't seem like it would make sense to make an index for every >possible combination... but there must be a way to do this >intelligently? It does not make sense for inserts and updates, but it sure makes sense for reproting, so have you considered separating your functionality

RE: Question about LOTS of indexes on a table

2006-09-20 Thread Quentin Bennett
If the combination of fields that will be subject to 'where' is unknown, and will be unknown forever, then I think you have no choice but to index each one individually and let MySQL make the choice as to which one to use. If, however, you know, or can establish, that certain combinations of 'f'

Question about LOTS of indexes on a table

2006-09-20 Thread Peter Van Dijck
Hi, I've been trying to figure this out for a while.. I have a table ITEMS with about 15 fields that can be used in any combination in where queries, let me call these fields f1 to f15. There are also 3 fields used for ordering, let's call them o1 to o3. So the table is: tablename (id, title, f1

Re: Find all rows with no matching rows in second table

2006-09-20 Thread mos
At 03:16 AM 9/20/2006, Johan Höök wrote: Hi André, you can do it like: SELECT a.* FROM tablea a LEFT JOIN tableb b ON b.a_id = a.a_id AND b.flag = 'y' WHERE b.b_id IS NULL; /Johan Johan, I don't think that is going to work. How is it going to have b.flag='Y' when it can't find the b r

Re: Searching for a MySQL Admin at TiVo

2006-09-20 Thread Joao Candido de Souza Neto
This person ought to be in USA? ""Leann Das"" <[EMAIL PROTECTED]> escreveu na mensagem news:[EMAIL PROTECTED] > If anyone would be interested in a contract, please contact me! > > Thanks! > > > Leann Das > Recruiter, TiVo > http://www.tivo.com/

Searching for a MySQL Admin at TiVo

2006-09-20 Thread Leann Das
If anyone would be interested in a contract, please contact me! Thanks! Leann Das Recruiter, TiVo http://www.tivo.com/ [EMAIL PROTECTED] Phone: 408-519-9134 Get the inside track to great jobs at TiVo

Questions about using mysqlimport to update a table.

2006-09-20 Thread Joe User
I need to update a table with the contents of a CSV file regularly, I've used mysqlimport to load all the initial data, but I have a problem with using it for updates. The data in the CSV file does not contain all of the data in the table, there is a field that is updated by another application as

Re: multicolumn indexes, yes or no

2006-09-20 Thread Dan Buettner
Surendra - The answer is - "it depends". A multi-column index can be helpful for performance over single-column - or it can do you no good at all, depending on how you build it and how you use it. MySQL currently uses (at most) one index per instance of a table per query. This means that addin

Difficult query

2006-09-20 Thread Neil Tompkins
Hi I've the following tables (holds a list of companies) TableName:Company CompanyID (int) CompanyName (varchar) (holds a list of areas) TableName:Area AreaID (int) AreaName (varchar) (holds a list of what areas are near to what companies), TableName:AreaCompanys CompanyID (int) AreaID

RE: How to delete all rows....

2006-09-20 Thread Peter Lauri
Sorry, did not read carefully. Either you loop thru all tables an do "DELETE FROM table" Or as someone else suggested, dump the structure, drop database, recreate from dump. /Peter -Original Message- From: Peter Lauri [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 20, 2006 2:56 P

Re: How to delete all rows....

2006-09-20 Thread Chris
Peter Lauri wrote: DELETE FROM table Truncate will be a lot better. DELETE FROM table will do it row by row which also means it will have to update any indexes applicable to the table as it goes... Lots of data & lots of indexes = very slow. -- MySQL General Mailing List For list archives:

RE: How to delete all rows....

2006-09-20 Thread Chandru, Pradeep
Hi, I prefer using TRUNCATE statement. syntax: TRUNCATE [TABLE] tbl_name This takes lesser time when compared to the delete from table. It takes hardly few seconds. take a backup before executing this if required. Regards, N.Pradeep Chandru. -Original Message- From: Peter Lauri [mai

Re: How to delete all rows....

2006-09-20 Thread Wagner, Chris (GEAE, CBTS)
But how will that interact with the auto increment counter? Will truncate reset the counter. Chris wrote: > > Peter Lauri wrote: > > DELETE FROM table > > Truncate will be a lot better. > > DELETE FROM table will do it row by row which also means it will have to > update any indexes applicable

Stored Procedure for list_zip_by_miles

2006-09-20 Thread Scott Hamm
I'm trying to create stored procedure, but after reading mysql's online document, I was not able to comprehend its usage. Here is what I do, put in target zip code and miles range, then find a list of zipcode, city, state and miles from target zip code. How do I get around to it? [code] SET @ta

Re: Null !?

2006-09-20 Thread Peter Brawley
Roberto >anybody knows how i should interpret the (null) >value in a field in order to visual.net can recognize >as just null and then make desicions? Compare it to DBNull.Value. PB - Roberto William Aranda-W Roman wrote: hello anybody knows how i should interpret the (null) val

multicolumn indexes, yes or no

2006-09-20 Thread Surendra Singhi
Hi, I have 4-5 different types of models which can be tagged. So, in the taggings table should I declare a multicolumn index on [taggable_type, taggable_id] or a single column index on [taggable_id]. What are the pros and cons of either, and which one is preferred? If multicolumn, then in what o

Problem installing MySQL 5.0.24a from RHEL RPM on Centos Linux VPS box

2006-09-20 Thread Vasudev Ram
Hi list, I'm trying to install MySQL 5.0.24a RHEL RPM on a Centos Linux VPS box. "uname -a" output on this box: Linux my.host.com 2.6.9-022stab078.14-enterprise #1 SMP Wed Jul 19 14:35:02 MSD 2006 i686 athlon i386 GNU/Linux It already has MySQL 4.1 RHEL installed on it - I checked this with "r

Re: SUM in WHERE

2006-09-20 Thread Douglas Sims
Following is one way of doing what you want. mysql> show create table t; +--- +--- -+ | Table | Create Table

Re: Find all rows with no matching rows in second table

2006-09-20 Thread Johan Höök
Hi André, you can do it like: SELECT a.* FROM tablea a LEFT JOIN tableb b ON b.a_id = a.a_id AND b.flag = 'y' WHERE b.b_id IS NULL; /Johan André Hänsel skrev: Hello list, I have two tables: Table A a_id name 1a 2b 3c Table B b_id a_id flag name 12yx 22ny 3

RE: How to delete all rows....

2006-09-20 Thread cknipe
FLUSH table ?? Quoting Peter Lauri <[EMAIL PROTECTED]>: > DELETE FROM table > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Wednesday, September 20, 2006 10:35 AM > To: mysql@lists.mysql.com > Subject: How to delete all rows > > > Hi All, > >

Re: Difficult query

2006-09-20 Thread Jo�o C�ndido de Souza Neto
I´m not sure if i understood clearly. If you want to list the area and all of companies near it, you could do it: select a.AreaName as Area, group_concat(c.CompanyName) as Companys from AreaCompanys a_c, Area a, Company c where a_c.AreaID=a.AreaID and a_c.CompanyID=c.

Re: How to delete all rows....

2006-09-20 Thread Douglas Sims
You might also look at TRUNCATE table... http://dev.mysql.com/doc/refman/5.0/en/truncate.html I believe that DELETE will not reclaim the storage space while TRUNCATE does, although I didn't see that in the documentation when I looked just now... ? Douglas Sims [EMAIL PROTECTED] On Sep

RE: How to delete all rows....

2006-09-20 Thread Peter Lauri
DELETE FROM table -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 20, 2006 10:35 AM To: mysql@lists.mysql.com Subject: How to delete all rows Hi All, How do I delete all the rows of all the tables(but not table) in the dat