select (SELECT dealer.FIRMID, (COUNT(*) -1) * 25.00 + 270.00 AS FEE
FROM `dealer` `dealer`
INNER JOIN `branches` `branches` ON
(`branches`.`FIRMID` = `dealer`.`FIRMID`)
WHERE (( `dealer`.`CRD_NUM` = 0 )
OR ( `dealer`.`CRD_NUM` IS NULL ))
AND ( `dealer`.`LIC_TYPE` IN
Initially I received the operand should only have one column so I removed the
dealer.FIRMID from the select statement and then the query just returns NULL.
Each query works fine on its own but I can't seem to combine it so that is
gives me the total of the fees.
Robin
Ananda Kumar
Robin,
select (SELECT dealer.FIRMID, (COUNT(*) -1) * 25.00 + 270.00 AS FEE
FROM `dealer` `dealer`
INNER JOIN `branches` `branches` ON
(`branches`.`FIRMID` = `dealer`.`FIRMID`)
WHERE (( `dealer`.`CRD_NUM` = 0 )
OR ( `dealer`.`CRD_NUM` IS NULL ))
AND ( `dealer`.`LIC_TYPE` IN
select * from a;
+--+
| id |
+--+
|1 |
|2 |
+--+
2 rows in set (0.00 sec)
mysql select * from b;
+--+
| id |
+--+
|1 |
|2 |
+--+
2 rows in set (0.00 sec)
mysql
mysql select (select id from a where id=1) + (select id from b where id=1);
I am very new to MySQL and trying to use Navicat Report Builder to format a
renewal invoice to send to our registrants. The renewal fees are fixed for
each type of registrant but the actual fee is not part of the database and must
be computed as the report is generated. As far as I can tell,