RE: MYSQL + acquiring table relationships

2005-01-17 Thread Dave Merrill
Shawn, what language(s) are you using to parse this? Could you share the code? Thanks, Dave Merrill > I prefer to parse the results of a "SHOW CREATE TABLE..." query. It's > rather trivial to detect which rows in the result of that statement are > your FOREIGN KEYS

RE: Plus sign doesn't concatenate strings in MySQL?

2005-01-15 Thread Dave Merrill
Let me ask a slightly different question: Is there a string concatenation operator in mysql when it's *not* running in ansi mode? Or is the only way to accomplish that to use CONCAT? I think I'm hearing that there is no operator, only CONCAT. Right? Dave Merrill -- MySQL Gener

RE: Plus sign doesn't concatenate strings in MySQL?

2005-01-15 Thread Dave Merrill
Um, I know that probably seemed a bit random, but I got a msg from someone saying that was how it worked; it certainly wasn't something I thought, hence the '???'. Your reply leads me to believe that was a private email not sent to the list. Dave Merrill > >??? > &g

RE: Plus sign doesn't concatenate strings in MySQL?

2005-01-15 Thread Dave Merrill
really are. I expected that core basics would be the same, with each manufacturer adding some proprietary extensions, and failing to support a (hopefully small) subset of standard features. Dave Merrill > At 07:37 -0500 2005/01/15, Dave Merrill wrote: > >I thought string concatenation

RE: Plus sign doesn't concatenate strings in MySQL?

2005-01-15 Thread Dave Merrill
standards. Typical Micro$oft intentional disruption. But it appears that MySQL doesn't support "||" either, and neither does SQL Server. So much for anyone other than customers caring about standards. Writing platform agnostic sql seems much less likely than I'd guessed, even o

RE: Strip off leading and trailing spaces once in db?

2005-01-15 Thread Dave Merrill
UPDATE my_table SET my_column = TRIM(my_column), my_other_column = TRIM(my_other_column) etc... Dave Merrill > Is it possible to remove all trailing and leading spaces for selected > fields once the data has already been loaded? > > Steve -- MySQL General Mailing List For l

Plus sign doesn't concatenate strings in MySQL?

2005-01-15 Thread Dave Merrill
MySQL, it gives 0. For MySQL, you seem to have to use CONCAT. I'm very surprised. Not only is this really really common operation much more awkward in MySQL, but I thought string concatenation w '+' was totally standard SQL. Not so? Is there some db option to allow it? Dave

RE: select & count

2005-01-13 Thread Dave Merrill
WHERE last_name IN ('smith', 'jones', 'thomas') GROUP BY last_name Dave Merrill -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

RE: select & count

2005-01-13 Thread Dave Merrill
similar facility in MySQL, or some add-on to it? I looked at EXPLAIN, but it doesn't seem to show costs. And bottom line (you knew I'd say this, right?), Try It! With your real data. Dave Merrill > What query suppose to be faster? Jan or Dave? > > Jan Solution: > SELEC

RE: select & count

2005-01-12 Thread Dave Merrill
om account where status = 'send') as count_send, (select count(*) from account where status = 'cancelled') as count_cancelled You could also build a stored proc that looped over a list of the values to find, or, I think maybe, over the actual distinct values in the field.

RE: Getting info about db columns

2005-01-12 Thread Dave Merrill
[Sending this to this list, just for general reference, since I didn't notice that Reply on this list goes to the poster, not the list. No other list I'm on works that way, so I plead Failure To Open Eyes.] Dave Merrill > "Dave Merrill" wrote on 01/12/2005 04:56:34 PM: &g

Getting info about db columns

2005-01-12 Thread Dave Merrill
at once - Only certain info about these cols (name and type only, say) Thanks, Dave Merrill -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]