All!
Sorry for crossposting again, but I hope that is OK. I have now
released MyQuery 2.1 beta, the MySQL Query and Scripting tool. 2.1
introduces one major feature and a few minor ones, as well as a few fixes.
- Major feature: Support for Multiple resultsets (from CALL commands
usually).
Did you try this?
SELECT
sum(fooditems.carb * mealitems.quantity) as sumcarbs,
sum(fooditems.gi * ((fooditems.carb * mealitems.quantity) /
sum(fooditems.carb * mealitems.quantity))),
sum(fooditems.gl * mealitems.quantity),
sum(fooditems.cal * mealitems.quantity)
Well, for your simple example, you can use query variables to add the
counters.
SET @cntr:=0, @lastVal:='A'
INSERT INTO tableB LOC,DATA SELECT CONCAT(LOC,
CONCAT( IF(@lastVal=LOC, @cntr:[EMAIL PROTECTED], @cntr:=0),
IF(@lastVal:=LOC,'',''))) LOC, CONCAT(DATA, @cntr) FROM tableA ORDER
BY
There is no way that I know of to reference every field in a table
without using a stored procedure. If you really need to do something
like that, and you will be adding new columns frequently, then it's
most likely an indication that your table structure is not normalized.
Those columns
Thanks for the tip. I am looking at just making 16 separate queries.
It will be easier to manage and faster to run.
Dan
On Sep 6, 2008, at 9:37 PM, Brent Baisley [EMAIL PROTECTED] wrote:
Well, for your simple example, you can use query variables to add
the counters.
SET @cntr:=0,
Hey Josh, I came in really late on this discussion. It's been my
experience that InnoDB is great until the size of the database/indexes
surpasses the amount of memory you can give to InnoDB for caching.
The performance drop off is pretty quick and dramatic. I've seen this
happen on live