Re: SQL query problem

2007-11-14 Thread Ravi Kumar.
Dear Mat, Your mail is not very clear. But I have a feeling that using '%' wildcard in the like operand should help you Regards, Ravi. On 11/14/07, Matthew Stuart <[EMAIL PROTECTED]> wrote: > > Hi, I have built a site with Dreamweaver and I have a problem with a > query. > > I am trying to

Re: Use select within delete

2007-11-14 Thread Ravi Kumar.
Try this (I do not have 4.0.24 to try): delete table1.* from table1, table2 where table1.id = table2.id and date wrote: > > Dario Hernan wrote: > > Hi all I need to delete some fields from a table but in the where > > clause I need to put a select command. > > For instance, delete from table1

Re: Not showing repeating fields.

2007-11-05 Thread Ravi Kumar.
select distinct vehicle from On 11/6/07, Jamessketch <[EMAIL PROTECTED]> wrote: > > > Hello, > > I have a table that looks like this: > > vehicle | type| color > car mercedes blue > boat croater silver > plane airbus red > car volvogreen > c

Re: Record Counting

2007-10-27 Thread Ravi Kumar.
Sorry a correction SELECT DISTINCT LEFT(DATE_FIELD_NAME, 10), COLOR_FIELD_NAME, COUNT(T.*) AS CNT FROM TABLE_NAME T GROUP BY LEFT(DATE_FIELD_NAME, 10), COLOR_FIELD_NAME Ravi On 10/28/07, Peter Brawley <[EMAIL PROTECTED]> wrote: > > Neil, > > Do you mean ... > > SELECT DATE(datetimecol) AS da

Re: Record Counting

2007-10-27 Thread Ravi Kumar.
Hi Neil, Try this: SELECT LEFT(DATE_FIELD_NAME, 10), COLOR_FIELD_NAME, COUNT(T.*) AS CNT FROM TABLE_NAME GROUP BY LEFT(DATE_FIELD_NAME, 10), COLOR_FIELD_NAME. Post the table structure if this does not help. Regards, Ravi On 10/27/07, Neil Tompkins <[EMAIL PROTECTED]> wrote: > > Hi, > > I have

Join & update help

2007-04-11 Thread Ravi Kumar.
Dear All, I have two tables T1 and T2. T1 has these columns: userid, password (userid is primary key) T2 has these columns: sessionid, userid, logintime, logofftime (sessionid is primary key) I wish to add one column in T1 called last_login_time. I want to populate this new column with max(

Re: Replication among disconnected Servers

2007-04-08 Thread Ravi Kumar.
Can any one help me please? Ravi Kumar. wrote: Hi All, We have a MySQL 5.0 server (master) running on Windows. For backup, I wish to setup another system with same version of MySQL to act as backup / slave. But this slave can not have direct access to the master. Is there a way I can achive

Replication among disconnected Servers

2007-04-05 Thread Ravi Kumar.
Hi All, We have a MySQL 5.0 server (master) running on Windows. For backup, I wish to setup another system with same version of MySQL to act as backup / slave. But this slave can not have direct access to the master. Is there a way I can achive this? I do not wish to take a full dump in maste

Thread safety

2006-12-07 Thread Ravi Kumar.
Dear All: I have a table T1 with these columns: location - varchar odd_even - varchar I have a php page that is called from VC applications installed in 5 different locations (L1, L2, L3, L4 and L5). The page returns 0 or 1 depending on even call or odd call from each location. (1s

Update query help

2006-12-06 Thread Ravi Kumar.
Dear Friends, I have two tables: T1, T2. T1 has 3 columns: playerid, gameid, score T2 has 2 columns: playerid, totalscore. I wish to update table T2 such that sum of T1.score of each player, gets updated in T2.totalscore. It may be something like this: update T2, T1 set T2.totalscore = sum(

Regular Exp help

2006-09-29 Thread Ravi Kumar.
Dear All, I have a table with a varchar column that stores data in this pattern: The pattern may be repeated upto 5 times in same cell, but the string will be different in each case. Hence there will not be a value like this: 1 BW - 2.5 BW - 1 WT - 1 BW - 1 ME - 1 BW - 1 ME - 1.5 SY

RE: Conditional copy of values

2006-09-25 Thread Ravi Kumar.
True, but they are very slow in 4.1.14. -Original Message- From: Michael Stassen [mailto:[EMAIL PROTECTED] Sent: Tuesday, 26 September, 2006 00:12 AM To: Ravi Kumar. Cc: mysql@lists.mysql.com Subject: Re: Conditional copy of values Ravi Kumar. wrote: > Dear All, > > I have

RE: Conditional copy of values

2006-09-21 Thread Ravi Kumar.
27; section prevents duplicate rowid values T2. Thanks again. Ravi. -Original Message- From: Gerald L. Clark [mailto:[EMAIL PROTECTED] Sent: Thursday, 21 September, 2006 18:30 PM To: Ravi Kumar. Cc: mysql@lists.mysql.com Subject: Re: Conditional copy of values Ravi Kumar. wrote: > D

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

Like inside in clause

2006-09-14 Thread Ravi Kumar.
Dear Friends, Is there a way to specify wildcard inside values of an in clause. I want to be able to do this: select id, name from tableName where name in ('a%', 'b%', 'c%'); instead of doing select id, name from tableName where name like 'a%' or name like 'b%' or name like 'c%';

Data dictionary for MySQL

2006-09-06 Thread Ravi Kumar.
Hi All, I am looking for a data dictionary for MySQL. It should be free and ideally, developed in php. And such that it stores the data dictionary in MySQL itself. Any suggestions / pointers? Regards, Ravi.

RE: Conditional Insert

2006-08-28 Thread Ravi Kumar.
: Johan Höök Cc: Ravi Kumar.; mysql@lists.mysql.com Subject: Re: Conditional Insert Much better. Good job. Douglas Sims [EMAIL PROTECTED] On Aug 29, 2006, at 1:26 AM, Johan Höök wrote: Hi Ravi, you can take a look at: http://dev.mysql.com/doc/refman/5.0/en/insert-on-duplicate.html which might

RE: Conditional Insert

2006-08-28 Thread Ravi Kumar.
insert, another thread inserts a matching record? Do we have any alternative? Thanks, Ravi. -Original Message- From: Douglas Sims [mailto:[EMAIL PROTECTED] Sent: Tuesday, 29 August, 2006 10:48 AM To: Ravi Kumar. Cc: mysql@lists.mysql.com Subject: Re: Conditional Insert Hi Ravi Standard

Conditional Insert

2006-08-28 Thread Ravi Kumar.
Dear Members, I wish to insert and update conditionally into a table using a single SQL statement. That is if a record already exists in a table, the statement should update it, else it should insert it. Probably something like this: if (select * from UserPoints where username = 'ravi') then (

Script run how???

2006-05-01 Thread Ravi Kumar
Hi, I want to run following command thru script . analyze table t1; optimize table t1; analyze table t2; optimize table t2; Can I do it on linux mysql ? I also want to run script like during analysing if we notice any error related with table then run repair table t1 l repair

Table Size

2006-04-05 Thread Ravi Kumar
Hi, What command used to check table size and database size? thanks - Blab-away for as little as 1¢/min. Make PC-to-Phone Calls using Yahoo! Messenger with Voice.

Re: Installation Issue

2006-02-14 Thread Ravi Kumar
ables: Table 'mysql.host' doesn't exist 060214 15:53:06 mysqld ended Please advice. thanks Imran Chaudhry <[EMAIL PROTECTED]> wrote: On 2/14/06, Ravi Kumar wrote: > Starting mysql with root.I tried withn mysql user account also but still same > error. > than

Re: Installation Issue

2006-02-14 Thread Ravi Kumar
Starting mysql with root.I tried withn mysql user account also but still same error. thanks "Peter M. Groen" <[EMAIL PROTECTED]> wrote: On Tuesday 14 February 2006 00:28, Ravi Kumar wrote: > Permission denied 060213 I assume you are starting MySQL NOT as root..

Installation Issue

2006-02-13 Thread Ravi Kumar
I have been noticing following message during mysql startup.the installation was fine. 060213 16:40:58 mysqld started 060213 16:40:59 InnoDB: Started; log sequence number 0 43655 060213 16:40:59 [ERROR] Can't start server : Bind on unix socket: Permission denied 060213 16:40:59 [ERROR] Do

Data Migration between 2 different schemas

2003-11-06 Thread Ravi Kumar
Hi !! I am new to My SQL. I have got a requirement where data existing in one schema has to be migrated to another. Both schemas look alike except some minor changes in the table definitions here and there. Does MySQL provide some kind of tools by default for these sort of things or we need to go