Re: select all events from (today-N) days

2006-04-10 Thread Ravi Malghan
Joerg: thank you. That worked and much faster too. WHERE EVENT_DATA.utime > UNIX_TIMESTAMP(SUBDATE(CURDATE(), 5)) AND EVENT_DATA.utime < UNIX_TIMESTAMP(SUBDATE(CURDATE(), 4)) Ravi --- Joerg Bruehe <[EMAIL PROTECTED]> wrote: > Hi Ravi, all, > > > Ravi Malghan wrote: &

How to pass parameters in MYSQL

2006-04-10 Thread Ravi Malghan
Hi: I have a statement such as follows SELECT EVENT_DATA.dstport WHERE FROM_UNIXTIME(utime,'%Y-%m-%d') = (CURDATE() - INTERVAL 1 DAY) ORDER BY EVENT_DATA.utime; Instead of using a value of 1 for interval, I want to pass parameters so it will ask for the value when the sql statement is run. I have

Re: select all events from (today-N) days

2006-04-10 Thread Ravi Malghan
how to get the start_time and end_time values. Thanks Ravi --- Joerg Bruehe <[EMAIL PROTECTED]> wrote: > Hi Ravi, all! > > > Ravi Malghan wrote: > > Ok. I found something. But wondering if this is > most > > efficient > > Events for yesterday: > >

Re: select all events from (today-N) days

2006-04-06 Thread Ravi Malghan
(DATE_FORMAT(CURDATE(),'%v')-1); TIA Ravi --- Ravi Malghan <[EMAIL PROTECTED]> wrote: > Hi: I have a date/time field (utime) which has unix > time in epoch time. I want to select events from > yesterday and another statement for all events from > previous week.

select all events from (today-N) days

2006-04-06 Thread Ravi Malghan
Hi: I have a date/time field (utime) which has unix time in epoch time. I want to select events from yesterday and another statement for all events from previous week. I have tried the functions listed at http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html. But I either get a synta

[RESOLVED] Re: copy one field value to another

2006-03-21 Thread Ravi Malghan
Thanks Bill. --- Bill Adams <[EMAIL PROTECTED]> wrote: > UPDATE table SET field_a=field_b; > > b. > > > Ravi Malghan wrote: > > >Hi: is there a way to copy all field values from > one > >field to another fr

copy one field value to another

2006-03-21 Thread Ravi Malghan
Hi: is there a way to copy all field values from one field to another from the mysql prompt? Thanks Ravi __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- MySQL General Mailing List For li

Newbie help: extracting pattern based data from fields

2006-02-27 Thread Ravi Malghan
Hi: My database is mysql 4.1.14-standard. I have a blob type field in a table1 with mutlple attributes together in the field as shown below table1.field1 value for a record is "abc=2 def=4 ghi=10" I have table2 which has fields abc, def and ghi. I want to be able to parse the table1.field1 and ins

sql error

2004-04-28 Thread Ravi Malghan
Hi: I am building perl scripts which can insert data into a database independent of the type of database. The following query works in postgresql, but I am getting the following error when I run sql query in mysql mysql> SELECT ipaddress FROM ip_via_pingsweep WHERE ipaddress NOT IN (SELECT ipadd