Re: Custom/conditional grouping?

2003-09-24 Thread Bruce Feist
> 49.995 Beware using 'double' for currency; it gives roundoff errors. Bruce Feist -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Does Null == ""?

2003-09-17 Thread Bruce Feist
Bob Hall wrote: Bruce Feist has initiated a discussion with me off the list, Off the list by accident, by the way. I sometimes forget that in this list I need to do a REPLY ALL. I generally don't go private unless I want to avoid embarassing someone or need to discuss something genuinel

Re: Does Null == ""?

2003-09-16 Thread Bruce Feist
uot;this value can contain a *value*, or it can contain one of N specific NULL values that I define". I assume that this would be done by the database designer rather than the programmer! It sounds reasonable enough, but possibly overengineering. Bruce Feist -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Does Null == ""?

2003-09-15 Thread Bruce Feist
s '' somehow), or there might be no password, indicating that the user doesn't even want to be prompted for one. I get very suspicious of scenarios where there are more than two possibilities -- it suggests that there might be an unlimited, or at least a large, number, and that

Re: Does Null == ""?

2003-09-15 Thread Bruce Feist
Dan Nelson wrote: In the last episode (Sep 15), Bruce Feist said: The application is payroll/personnel. A programmer is tasked with creating forms for data entry on new employees, including supervisor. If the user doesn't enter a new employee's supervisor, the application

Re: Does Null == ""?

2003-09-15 Thread Bruce Feist
enance on databases that contained zero-length strings, and they were nightmares. I can't think of any reason why you would use a zero-length string in a database. Because you know that a given person has no middle name? To represent "no value", as differentiated from &

Re: Does NULL == ""?

2003-09-15 Thread Bruce Feist
qual to anything, even to itself, while "" = "". Bruce Feist -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: SELECT only unique records

2003-09-15 Thread Bruce Feist
ow can one search for those? Select distinct on both: select distinct stateID, cityID ... Bruce Feist -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Selecting consecutive rows

2003-09-12 Thread Bruce Feist
M ranges r LEFT JOIN row_info bad ON r.row_num = bad.row_num AND (bad.seat_num BETWEEN r.seat_num + 1 AND r.seat_num + :seats_needed -2) AND bad.seat_status <> AVAILABLE WHERE bad.row_num IS NULL; SELECT * FROM good_ranges; DROP ranges, good_ranges; Warning

Re: joining tables(non-equal join)

2003-09-11 Thread Bruce Feist
me IS NULL UNION SELECT t1.name, t2.name FROM table2 t2 LEFT JOIN table1 t1 ON t2.name = t1.name WHERE t1.name IS NULL Bruce Feist -Original Message- From: xander xxx [mailto:[EMAIL PROTECTED] Sent: Thursday, September 11, 2003 2:56 AM Yes, that´s exactly what i get, but that´s not what i

Re: joinig tables(non-equal join)

2003-09-11 Thread Bruce Feist
rn every t2 row except for one (if any) which does not match the t1 row. Bruce Feist -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Select query question

2003-08-29 Thread Bruce Feist
st as high as the one from 'a'. And, the "HAVING" clause allows us to isolate scores in 'a' which are second-highest using that information; we then compute the average score that's at least as high as the second-highest value. Bruce Feist -- My

Re: listing all people who have the same firstname and lastname

2003-08-29 Thread Bruce Feist
id* have listed in his original question. If IDs are needed, try this: SELECT a.id, a.lname, a.fname, count(b.id) FROM people a LEFT JOIN people b ON a.lname = b.lname AND a.fname = b.fname GROUP BY a.id, a.lname, a.fname HAVING count(b.id) > 1; I haven't tested this, but I think it ough

Re: Select with join query question

2003-07-29 Thread Bruce Feist
Richard Bolen wrote: This gives the count per job which is always 1. Oops! Quite right. I don't see a way to get the total off-hand. Bruce -Original Message- From: Bruce Feist [mailto:[EMAIL PROTECTED] Sent: Monday, July 28, 2003 7:42 PM To: Richard Bolen Cc: [EMAIL PROT

Re: Select with join query question

2003-07-28 Thread Bruce Feist
Richard Bolen wrote: This works! I was then wondering how to get the total number of all jobs that this condition is true for? Just include count(distinct j.jobid) in the SELECT list. Bruce select j.* FROM Jobs j LEFT JOIN Submissions s ON j.jobid = s.jobid GROUP BY /* all selected columns

Re: Select with join query question

2003-07-28 Thread Bruce Feist
alue for status, you can simplify this a bit. Bruce Feist -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: "between A and B" with another condition?

2003-07-22 Thread Bruce Feist
also a more subtle one on name. Try "name between 'a' and 'bz' or something of the sort instead; 'Bob' > 'b' and just specifying the first letter won't work. Or, if you're worried about trailing z's or other high charact

Re: MySQL vs. PostgreSQL -- speed test

2003-07-14 Thread Bruce Feist
n in choosing a DBMS. Features, stability, security, and so on can be just as important or more so. No single DBMS is going to win all the prizes; the trick is to find the one with the right balance. Bruce Feist -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsub

Re: Request modelling

2003-07-11 Thread Bruce Feist
)<10 GROUP BY schedule_id ; My problem is that I would need to use the count function actually within the WHERE (clause which is not allowed). That's precisely why HAVING exists. SELECT schedule_id,count(schedule_id) FROM attendance HAVING count(schedule_id) <10 GROUP BY schedule_

Re: left join help

2003-07-09 Thread Bruce Feist
the result. Try: SELECT * FROM (history h LEFT JOIN members m ON h.member_id = m.id) LEFT JOIN activity a ON h.activity = a.id WHERE h.date = ; Bruce Feist create table members ( id unsigned int autoincrement, name ) create table activity ( id unsigned int aut

Re: Optimal Disk Configuration

2003-07-07 Thread Bruce Feist
amount of time? How long it takes for a full-table scan? Minimal impact on other processes running? (OK, it can't be this one since it's a dedicated server.) Minimal time required to restart after a catastrophic failure? Bruce Feist -- MySQL General Mailing List For list archiv

Re: Newbie SELECT problem

2003-07-02 Thread Bruce Feist
Tim Winters wrote: So what I want to be able to do is single out a user (999) and retrieve all the sessions he was involved in. But I don't want duplicate session numbers (one is enough). Make any more sense? Yes. The solution I posted earlier should work. Bruce Feist -- MySQL Ge

Re: Newbie SELECT problem

2003-07-02 Thread Bruce Feist
ted in for that session, for instance, the first? If so, try: SELECT sessionID, userID, min(date), min(time) FROM sti_tracking WHERE userID = 999 GROUP BY userI, sessionID Even if I misunderstood, you can probably adapt this into what you really want. Bruce Feist -- MySQL General Mailing Lis

Re: More tables or more joins

2003-07-02 Thread Bruce Feist
d, fieldname, and contactid, and create customization that way. This is probably similar to what you were describing in your second scenario; I'm not sure, because I don't know what an 'account relationship' is. Bruce Feist -- MySQL General Mailing List For list ar

Re: set autocommit

2003-06-30 Thread Bruce Feist
n't have enough experience to be sure. Bruce Feist -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Advanced Query Help (My brain hurts!)

2003-06-29 Thread Bruce Feist
just have to beat up the system guys for making me do this :) You're welcome. Good luck with it. Bruce Feist -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Advanced Query Help (My brain hurts!)

2003-06-28 Thread Bruce Feist
t ON cirt.zipcode = cilt.zipcode WHERE cirt.appl = 'CIRT' AND cilt.appl = 'CILT' ORDER BY z.zipcode; SELECT * FROM zips; UPDATE listmaster SET status = 'WD' WHERE zipcode IN (SELECT zipcode FROM zips); DROP TABLE zips; DROP TABLE zipapp; Another simplification that you can i

Re: Advanced Query Help (My brain hurts!)

2003-06-28 Thread Bruce Feist
otherguy wrote: That gets me halfway there Does it? In your original question, you'd indicated that you only wanted zips where *both* criteria were met -- enough CIRGs and enough CILTs. By using a UNION, you'll be getting zips where *either* is met. Bruce Feist -- MySQL Gener

Re: How can a single row with a single column represent 2 values without bitwise data representation

2003-06-27 Thread Bruce Feist
Bruce Feist wrote: One -->possibility would be to break the values out into multiple columns, one -->for each view, and have indexes on each of those columns, or at least -->the views that you consider most important. It might help to make them -->compound indexes, with each inclu

Re: How can a single row with a single column represent 2 values without bitwise data representation

2003-06-27 Thread Bruce Feist
there are more political views that you'd like to track in the future. However... aren't you worried that a 'politics' table is likely to be corrupt? Bruce Feist -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: incorrect SUM() results

2003-06-27 Thread Bruce Feist
ing the results of the above query. Issue an aggregate query against it, summarizing by accountno, and then drop the temporary table. Bruce Feist -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: SELECT single record

2003-06-27 Thread Bruce Feist
ombine it or them with what you already have, probably removing the LIMIT. (The LIMIT is correct if you want a single row but don't care which one it is, but from your elaboration that is not the case.) Bruce Feist -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysq

Re: group by clause

2003-06-26 Thread Bruce Feist
w_or_local | sum | +++-++ |BHE | R2 | local50 | |BHE | R2 | local 12 | +++-++ It looks to me like a data problem, where some rows have leading tabs or spaces before "R2" in the prot column and others don't.

Re: Join vs. Where (help)

2003-06-25 Thread Bruce Feist
nt to the comma operator except that it allows and requires the ON clause. It is also supported by standard SQL usage in other RDBMSs. Bruce Feist -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: selecting PRIMARY KEY when there is no unique value

2003-06-19 Thread Bruce Feist
ent to access it directly. In other words, the trade-off is in simplicity of database design (use the existing fields) versus simplicity and efficiency in doing single-row look-ups. The latter is only significant if you expect to be retrieving the row on its own. Bruce Feist -- MySQL Gene

Re: SQL question

2003-06-19 Thread Bruce Feist
nated they are ABBBC and ABBC Select compares ABBC to the above and it matches, so BB, C, 1 is returned (incorrectly) Select compares ABBBC to the above and it matches, so BB, C, 2 is returned Select compares ABBC to the above and it matches, so B, C, 3 is returned Bruce Feist On Thu, 19 Jun 200

Re: SQL question

2003-06-19 Thread Bruce Feist
. To illustrate the possible problem, run the above query on the following data: dt_tm stocksku qty dt1 A BB 1 dt1 ABB 2 Jake's query will return a single row instead of two rows. (Sorry, Jake, I don't mean to put you on the spot!) Bruce F

Re: Practice test

2003-06-10 Thread Bruce Feist
y, as Mike also points out, the people that I see complaining about the lack of skill testing are obviously long-time users very proficient in MySQL, Heh. I'm a MySQL newbie. (But I have twenty years of experience with RDBMSs ). Excellent discussion, by the way. Bruce Feist (retired

Re: Practice test

2003-06-10 Thread Bruce Feist
e the parentheses in an INSERT goes may still be skilled and useful. I have to agree that most certification tests are a brain-dump, I don't think it has to be that way. Bruce Feist (retired database instructor / courseware designer) -- MySQL General Mailing List For list archives: http:

Re: Practice test

2003-06-10 Thread Bruce Feist
Jeremy Zawodny wrote: On Tue, Jun 10, 2003 at 12:50:04PM -0500, Paul DuBois wrote: At 7:51 -0700 6/10/03, Jeremy Zawodny wrote: What's the point of such a question? Anyone with access to MySQL can find out by simply running the query. You don't have access to MySQL during the test.

Re: Practice test

2003-06-10 Thread Bruce Feist
exes? 9) Which of the following queries corresponds to the following query with a NOT EXISTS subquery? 10) Match the following filenames to their corresponding table structures. And so on. Heck, the commonly asked questions on this list would make a pretty good test! Bruce Feist (retired database inst

Re: array/pointer question

2003-06-09 Thread Bruce Feist
Peter Brawley wrote: Peter Brawley wrote: MySQL, like other relational databases, does not support arrays or pointers. I didn't write that. My apologies -- it was written by John Griffin, not Peter Brawley. I edited carelessly. Oops. Bruce Feist -- MySQL General Ma

Re: array/pointer question

2003-06-09 Thread Bruce Feist
Peter Brawley wrote: MySQL, like other relational databases, does not support arrays or pointers. Of course, relational databases don't allow duplicate rows in table, either... I have yet to find a "relational" database with that feature! Bruce Feist -- MySQL General M

Re: Foreign Key in Innodb and Index Usages

2003-06-07 Thread Bruce Feist
s to a two-column index. If you know the surname, you can still find the author quickly. If you know only the given name, you cannot. Bruce Feist -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Mysql language

2003-06-06 Thread Bruce Feist
Heikki Tuuri wrote: InnoDB is totally C, MySQL half C++ and half C, with a few hundred lines of x86 Assembler. Oh? I thought that MySQL ran on Mac OSX as well as various Intel platforms. Bruce Feist -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To

Re: Specifics on using join & multiple tables

2003-06-05 Thread Bruce Feist
Patrick Shoaf wrote: At 09:48 AM 6/4/2003, Bruce Feist wrote: I suspect that sales1 and sales2 should really be a single 'sales' table with an extra column indicating which month the sales are for (and maybe one for year as well), but I don't have enough information to be sur

Re: Specifics on using join & multiple tables

2003-06-04 Thread Bruce Feist
and sales2 should really be a single 'sales' table with an extra column indicating which month the sales are for (and maybe one for year as well), but I don't have enough information to be sure. Bruce Feist -- MySQL General Mailing List For list archives: http://lists.mys

Re: MySQL: standard SQL compliancy: primary keys: default: should be NOT NULL

2003-06-04 Thread Bruce Feist
vantages as I pointed out above, but it also has corresponding advantages. Leaving out a feature that was specified in a standard 11 years ago doesn't fall into this category, though! Bruce Feist -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

Re: complex Subquery

2003-06-04 Thread Bruce Feist
mpanyid = l.Companyid where CompanyName='Arihant Jain' and City='Delhi' AND Userid = 1 AND Qualifyflag IN (1, 2) UNION Select CompanyName,City from Company c INNER JOIN accountsorder a ON c.Companyid = a.Companyid where CompanyName='Arihant Jain' and City='Delhi'

Re: efficient query or not?

2003-06-03 Thread Bruce Feist
terms of $latitude and $longitude separately, and AND them into your WHERE. My trig is too rusty to do this, unfortunately. Anyway, if latitude and longitude are indexed (or at least one or the other), doing so ought to allow the optimizer to narrow down the places which must be scanned dr

Re: Not Null isn't working or am I wrong

2003-04-05 Thread Bruce Feist
ish between the two, as MySQL does. But I certainly understand his confusion! Bruce Feist -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Primary key

2003-04-04 Thread Bruce Feist
g will be plugged in. Bruce Feist -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: date ranges

2003-04-03 Thread Bruce Feist
Bruce Feist wrote: Instead, if the four dates are s1, e1, s2, and e2 (s=start, e=end), we want: s1 <= e2 /* first range can't start after second range ends */ AND s2 <= e1 /* second range can't start after first range ends */ Bruce Feist also wrote: Your original

Re: date ranges

2003-04-03 Thread Bruce Feist
inal query does. e1 >= s2 ... what? yeah... it's an end date.. it's gonna be great than a start date by nature. But it's an end date from another range. There's not necessarily any relationship between the two. Your original suggestion works if the two ranges partially o

Re: date ranges

2003-04-02 Thread Bruce Feist
Example: start_date = "2002-01-01" and end_date = 2003-02-01". Instead, if the four dates are s1, e1, s2, and e2 (s=start, e=end), we want: s1 <= e2 /* first range can't start after second range ends */ AND s2 <= e1 /* second range can't start after first range ends

Re: select help

2003-04-02 Thread Bruce Feist
s.os_code, s.solution FROM os_table o, solution_table s WHERE (o.os_id & s.os_code) = @desired_id; Why not combine them into a single intriguing non-equijoin? SELECT * FROM os_table o, solution_table s WHERE (o.os_id & s.os_code) = o.os_id AND o.os_name = "win nt"; Bruce Feist -

Re: Opposite of DISTINCT()

2003-04-01 Thread Bruce Feist
uplicates, in which case a join would be needed. (It would not, however, be quite the join shown below... one query would find the rows with duplicates and yield a temporary table, and then the second would join that table back to the original to find the details. Bruce Feist -Ori

Re: Optimize query, avoid 'using temporary'

2003-04-01 Thread Bruce Feist
n index) is likely to help significantly. In fact, unless the combination of all three of those fields is a unique identifier, I suggest that you index on that combination. Indexing "files" on the combination of lang_id and directory_id might help as well. Bruce Feist -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: MySql, PHP, and Dates

2003-03-31 Thread Bruce Feist
like date(), getdate() etc. on it. This is probably the technique I'll use. What do you mean by php date? I mean "I am a confused newbie and for some reason I think that PHP has a date primitive type." Thanks to you and others, I am now straightened out . Bruce Feist -

Re: embedded select / left join question

2003-03-29 Thread Bruce Feist
contestEntries.ContestNumber = 1 where contestEntries.entrant is null Bruce Feist -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

MySql, PHP, and Dates

2003-03-28 Thread Bruce Feist
would be better for me to request the date in a specific form (ideally one taken from operating system preferences). Thanks! Bruce Feist -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: MySQL, Snort & ACID

2003-03-28 Thread Bruce Feist
TIMESTAMP('2003-03-25 15') ) LIMIT 0, 50; It looks to me as though your use of the UNIX_TIMESTAMP function is preventing any indexes that you might have from being used. I suggest that you phrase your queries without them, and index on timestamp if you haven't alread

Re: Join Question

2003-03-27 Thread Bruce Feist
alx wrote: On Fri, 2003-03-28 at 01:39, Bruce Feist wrote: Usually it's best to work with normalized tables, which would make this trivial. tbl_reports isn't normalized, since it has a simulated array of persons in it. Could it be split into two tables: i'm inter

Re: Join Question

2003-03-27 Thread Bruce Feist
ou can generalize. SELECT * FROM tbl_reports r LEFT JOIN tbl_personnel p1 ON r.person1 = p1.per_id LEFT JOIN tbl_personnel p2 ON r.person2 = p2.per_id ; If you need more reasons that denormalized tables are usually not a good idea, just ask. Bruce Feist Charles Klin

Re: Query not returning what I expect....

2003-03-26 Thread Bruce Feist
LaBranche, Kevin wrote: The following query returns 0 for sCode instead of a string like "XXX:XX". I am modifying an existing app from SQL Server 7 so that it can also run with a MySQL backend The existing query in SQL Server 7 works fine SELECT sDAMIONCode, (sORI + ':' + sDamionCode) as

Re: Strange Query

2003-03-26 Thread Bruce Feist
Table2.MasterID LEFT JOIN Table3 ON Table1.MasterID = Table2.MasterID GROUP BY Table1.MasterID, NumberRequested Bruce Feist -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Query help needed please

2003-03-21 Thread Bruce Feist
ra4.id, but modify it to allow NULLs for dra4.id or dra3.id and dra4.id or dra2.id, dra3.id, and dra4.id, or all four of them. Like I said, *ugly*. Bruce Feist Here is the setup. 3 tables. tbl_personnel, tbl_personnel_dras, tbl_dra each person in the tbl_personnel table can have 0 - 3 records in

Re: Don't show a record based on a condition?

2003-03-21 Thread Bruce Feist
he data will be NULL. SELECT * FROM info i LEFT JOIN codes c ON i.IDNum = c.info_IDNum WHERE c.code IS NULL; Bruce Feist - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/

Re: another table to query!

2003-03-19 Thread Bruce Feist
Andrew wrote: ok this is making sense and I should have thought about this before* I created my city table as now I have a city table that in effect is useless and comlicated the existing queries :( Well, your city table probably isn't useless... it can be used to translate city IDs into city na

Re: another table to query!

2003-03-19 Thread Bruce Feist
ou can and should remove city_id from items. If you have a significant amount of data already entered, you might want to copy the cityid/itemid information from items into item_city first. Bruce Feist - Before posting, p

Re: Re: another table to query!

2003-03-19 Thread Bruce Feist
ities. Is the best way to do this to create a new table and call it reference_city with items.ItemID and city.CityID as the columns? Yes, although I'd probably call it item_city to make it more obvious what it is. Bruce Feist PS If you specify sql,query,queries, or smallint in a message to thi

Re: Please tell me why to use KEY (a_id, b_id) rather than KEY (a_id),KEY (b_id)

2003-03-18 Thread Bruce Feist
search, is that true? Almost certainly *not*. Most RDBMSs have optimizers good enough to realize that the order of the conditions is irrelevant. I assume that this is true of MySql. But, I'm a newcomer to MySql, and I could be wrong. Bruce Feist -

Re: Selecting only ONCE from multiple tables

2003-03-18 Thread Bruce Feist
elect * from Cases C WHERE C.Amount > 500 UNION ALL Select * from Temp T WHERE T.Amount > 500; Warning -- my main expertise is with other RDBMSs, and this syntax might be incorrect for MySql. Bruce Feist - Before posting,

Re: AW: EMS MySQL Manager for Linux 1.15 released!

2003-03-17 Thread Bruce Feist
Peter Brawley wrote: Absent a list for MySQL-centred products & their support, I appreciate occasional product & book announcements. I agree. Bruce Feist - Before posting, please check: http://www.mysql.com/ma

Re: Looking for a bona fide distributed database that is open source

2003-03-15 Thread Bruce Feist
ster was asking about. A human being still must figure out what the most effective distribution strategy is. MySQL is a fine RDBMS; it simply does not implement distribution in its engine. By claiming that it does, you do a disservice to other RDBMSs which *do*, and to people looking for such

Re: Looking for a bona fide distributed database that is open source

2003-03-14 Thread Bruce Feist
ction with MySQL would indeed create a distributed database management system. Bruce Feist - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To re

Re: How to implement this query - can you help pls?

2003-03-14 Thread Bruce Feist
NNER JOIN priceListItems PLI ON IPPL.listID = PLI.listID INNER JOIN products P ON PLI.prodID = P.prodID WHERE PL.validFrom < CURRENT_DATE AND PL.validTo > CURRENT_DATE AND P.catID = AND PE.perID = ; Also, I suspect that you wanted ">=" and "<=" in your

Re: Looking for a bona fide distributed database that is open source

2003-03-14 Thread Bruce Feist
r and table 'b' is on a Linux machine. The DBMS should keep track of which table is in which database on which computer, and its optimizer should be capable of figuring out an efficient way of resolving such queries. Can MySQL do that? Bruce Feist - Original Message - From: &q

Reality Check: Copying MSAccess to MySQL data

2003-03-13 Thread Bruce Feist
ning anyway, and although the tables are small (a few hundred rows in each of about 8 tables), there's a lot of joining going on. Better ideas are welcome. Thanks! Bruce Feist - Before posting, please check: http://w

Re: Absolute Deletion

2003-03-13 Thread Bruce Feist
S's. Under some circumstances (specifically, if there's any compression or variable-length rows involved), the update can cause a row to be moved to elsewhere in its file, much like a delete/insert combination, which could leave data physically present although logically in

Re: Linking Tables

2003-03-13 Thread Bruce Feist
ng this sound more absolute than it really is, but this is basically true.) I won't explain it further now... if you have more questions after reading, ask away and we'll be glad to help! Bruce Feist - Before posting,

Re: SQL Statement Problems (NOT IN)

2003-03-12 Thread Bruce Feist
: SELECT t1.t1id FROM t1 LEFT JOIN t2 ON t1.t1id = t2.t2id GROUP BY t1.t1id HAVING min(abs(t2.t2gid - 192)) > 0 OR min(t2.t2gid) IS NULL; I haven't tested this, but I believe that it will work. Bruce Feist The example is actually given in the MySQL manual itself (section 1.7.4.1). I am t

Re: MySQL sql query help

2003-03-09 Thread Bruce Feist
all, I think I'm a little closer to understanding joins! Excellent! Bruce Feist - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive)

Re: select rows based on the results from another query

2003-03-09 Thread Bruce Feist
> > MySQL doesn't support subqueries. Instead use a temporary table or a join. SELECT distinct tbl1.* from tbl1 INNER JOIN tbl2 ON tbl1.coln1 = tbl2.coln2; should give the same results as your query if there aren't

Re: HAVING behaviour

2003-03-08 Thread Bruce Feist
re table as a psuedo-subquery and remember the result 2) Evaluate and apply WHERE clause to table f2. 3) Since there is no more summarization to be done, treat the HAVING as a WHERE clause, and evaluate and apply it to the individual rows, using result remembered from (1). And those are the conclu

Re: MySQL sql query help

2003-03-07 Thread Bruce Feist
he WHERE clause: AND tc3.classid IS NULL Give it a try and let me know if it works! Bruce Feist - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list ar

Re: Newbie Install Questions: RH Linux 7.1

2003-03-06 Thread Bruce Feist
Egor Egorov wrote: On Wednesday 05 March 2003 19:34, Bruce Feist wrote: I'm having trouble getting MySQL running on a RedHat Linux 7.1 machine. The log file complains that "host.MYD" is missing; I don't see mention of this file in the documentation, and it's not on my co

Re: Simple SELECT question

2003-03-05 Thread Bruce Feist
'John' ought to do the trick for you. Bruce Feist, also born in 58 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this

Newbie Install Questions: RH Linux 7.1

2003-03-05 Thread Bruce Feist
't know how to create it -- I assume it'll take more than a 'touch'! Bruce Feist - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list ar

Re: Perplexed by reverse SELECT statement.

2003-03-04 Thread Bruce Feist
' to cover the case where there's only one reader. Other than that, I agree. Bruce Feist - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list ar

Re: Crazy SELECT SUM ... JOIN ... GROUP problem

2003-03-03 Thread Bruce Feist
saleCount for each clientID, but SQL doesn't, unless we do the grouping that way. An alternative would be to select max(f.totPrice) and max(f.saleCount) instead. Bruce Feist - Before posting, please check: http://www.mys

Re: Troubles with joining tables

2003-03-02 Thread Bruce Feist
all. YMMV. I'm a newbie to MySQL, so my generalities may not hold up for this specific DBMS. Bruce Feist - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the

Re: Troubles with joining tables (cont)

2003-03-02 Thread Bruce Feist
ry by using an INNER JOIN and dropping the temp.xy IS NOT NULL clause? Bruce Feist - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To re

Re: Troubles with joining tables

2003-03-02 Thread Bruce Feist
won't be taking on a significant amount of additional overhead -- you're already scanning all the table2 rows because of your GROUP BY. Or, are you talking about multiple SELECT statements? Bruce Feist - Before posti

Re: A Simple Query!

2003-03-01 Thread Bruce Feist
L.idFilm WHERE (L.idFilm IS NULL) OR (L.dateReutrn IS NULL) ; regds, -Original Message----- From: Bruce Feist [mailto:[EMAIL PROTECTED] Sent: Saturday, March 01, 2003 08:13 select F.idFilm, F.title from Films F left join Loans L on F.idFilm = L.idFilm and L.dateReturn IS NULL where L.idFilm I

Re: A Simple Query!

2003-02-28 Thread Bruce Feist
ot;where", by the way; it looks self-contradictory, but shouldn't be. Because of the "left" join, the "on" should pick up Films without matching Loans, and set the Loans.idFilm to NULL to show that it did. Bruce Feist Remi Mikalsen wrote: I believe, and hope, I hav

Installation and Configuration

2003-02-22 Thread Bruce Feist
't connect to the database as 'root' with: mysql -u root mysql but I get "access denied" messages. I tried wiping out the security data and recreating it with: mysql_install_db but that didn't seem to impro