Re: Machine Learning

2012-08-23 Thread shawn wilson
just a few thoughts (things to look into) if you want to populate a db with command parameters, i'd mine the man pages. it's a consistent format and you should be able to find a parser for whatever language you prefer. if you want to see what has been entered and statistics about that process, lo

Re: a lesson in query writing and (maybe) a bug report

2011-08-27 Thread shawn wilson
On Sat, Aug 27, 2011 at 17:33, Arthur Fuller wrote: > I agree 110%. It is completely pointless to index a column with that amount > of NULLs. In practical fact I would go further: what is the point of a > NULLable column? I try to design my tables such that every column is NOT > NULL. In practice

RE: Too many aliases

2011-08-03 Thread shawn wilson
On Aug 3, 2011 9:24 AM, "David Lerer" wrote: > > I rarely use aliases (unless rarely required in self-join queries). > When I have that option, I create unique columns by prefixing every > table (and its objects) with a number. > Something like: > Create table T1234_Employee > (C1234_Employee_id

Re: How select all records exact x days ago ?

2011-07-31 Thread shawn wilson
mysql> select day(now())-5; +--+ | day(now())-5 | +--+ | 26 | +--+ 2011/7/31 yavuz maslak : > > I don't want all records during 5 days ( 24*5days ) . Only I need  records > at 5 days ago ( for instance 24 hours on 26 th July 2011) ? > > How can I do t

Re: rebuilding table

2011-07-23 Thread shawn wilson
Look into select into or just insert. The mysql doc covering this might even have a suitable example. On Jul 23, 2011 8:42 AM, "Velen Vydelingum" wrote: > Hi, > > I have 2 tables and need to create a 3rd one as follows: > > Table Sales: > Code Price sQty sDate > 123 12.00 2 2011-03-12 > 190 10.00

Re: How to Shuffle data

2011-07-14 Thread shawn wilson
On Thu, Jul 14, 2011 at 10:50, Jerry Schwartz wrote: > There are a couple of problems with using any database for doing this. > you're probably right. that said > - Rows in a table are inherently in no particular order. That means they are > neither sorted nor random. > - Depending upon the

Re: How to Shuffle data

2011-07-13 Thread shawn wilson
On Jul 13, 2011 6:41 AM, "Adarsh Sharma" wrote: > > Dear all, > > I have million of sites stored in url column of a mysql table. > > I need to shuffle the . words . Is there any in built function in mysql to achieve this. > Why would you want to do this in mysql? What's your programming language

Re: query for twin primes

2011-07-13 Thread shawn wilson
On Jul 13, 2011 2:26 PM, "Elim Qiu" wrote: > > I have a prime table > +-+--+-+ > | oid | pv | descipt | > +-+--+-+ > | 1 |2 | NULL| > | 2 |3 | NULL| > | 3 |5 | NULL| > | 4 |7 | NULL| > | 5 | 11 | NULL| > | .

Re: Join based upon LIKE

2011-05-03 Thread shawn wilson
I'm actually enjoying this discussion because I have the same type of issue. However, I have done away with trying to do a full text search in favor of making a table with unique fields where all fields should uniquely identify the group. If I get a dupe, I can clean it up. However, like you, they

design question

2011-05-02 Thread shawn wilson
i'm just looking for rough ideas here... i've got a table that has 31 fields. most of them need to be there (entry time, exit time, entry lat, etc). however, i've got 4 fields that i query this db with that should generally be unique... well, really 3 fields that should be unique, because the 'nam