Here's my trigger code:
DELIMITER $$
DROP TRIGGER /*!50032 IF EXISTS */ `piecerate`.`spUpdate_Queue`$$
create trigger `piecerate`.`spUpdate_Queue` AFTER UPDATE on
`piecerate`.`queue`
for each row BEGIN
call spUpdateQueueCounts(new.iorderid);
insert into crap (iid,iorderid) values...
I have an UPDATE trigger on my inventory_transactions table, set to call the spUpdateInventoryCounts procedure for the iInventoryID (FK) record being modified. Here's the code for my update trigger:
DELIMITER $$
DROP TRIGGER /*!50032 IF EXISTS */ sp_IT_Update$$
create trigger sp_IT_Update...
MySQL5 doesn't like my UPDATE trigger:
DELIMITER $$
DROP TRIGGER /*!50032 IF EXISTS */ `tiremate`.`sp_updatetrans`$$
CREATE TRIGGER `tiremate`.`sp_updatetrans` AFTER UPDATE on
`tiremate`.`inventory_transactions`
FOR EACH ROW BEGIN
update inventory
set iqtyinstock = (select sum(nqty)
from...
My VFP9 app uses a MySQL5 database. I've reviewed the syntax of the MYSQLDUMP command but I'm unsure of how to invoke that from my VFP9 app.
I'd basically like to have a simple option on my app's menu that says "Backup database" whereby my code then runs something like...
Here's the connection string I use commonly with my VFP9 apps connecting to a MySQL5 backend:
DRIVER={MySQL ODBC 3.51 Driver};SERVER=localhost;UID=mike;PWD=foxrocks;DATABASE=mydb;option=131609
I was wondering what other values for the OPTION parameter folks use? Sometimes, I get some...
Here's the connection string I use commonly with my VFP9 apps connecting to a MySQL5 backend:
DRIVER={MySQL ODBC 3.51 Driver};SERVER=localhost;UID=mike;PWD=foxrocks;DATABASE=mydb;option=131609
I was wondering what other values for the OPTION parameter folks use? Sometimes, I get some...
I had heard a rumor (perhaps about MySQL) that if you design tables to have field widths of multiles-of-8 (like varchar(8), varchar(16), varchar(64)) that they'd perform better (perhaps due to internal optimizations based on computer-word lengths).
Any truth to that?
tia,
--Michael
I created a simple lookup table with these columns:
iid = auto-inc, primary key
cReference = varchar(30), reference to owner/entity
cCode = varchar(16), abbreviation used as FK in other tables
cDescription = varchar(64), description for cCode
I've got a primary index on iid (obviously), and I...
Assuming an index on cCustNum field, which would be better in terms of performance?
1) select distinct cCustNum from MyTable where <somecondition>
2) select cCustNum from MyTable where <somecondition> GROUP BY cCustNum
QA's estimated execution plan seems to show that these are identical, but...
I get the following error when checking syntax of my stored proc:
Microsoft SQL-DMO (ODBC SQLState: 42S01)
---------------------------
Error 2714: There is already an object named '#TempReps' in the database.
...but the temp table DOESN'T exist!!!!!!! I checked TempDb and it's not there. I...
What are the ramifications of choosing the specific data type of these two (float or decimal)? I need to store numerics with known decimal widths, and then do calculations on them later (multiplying and adding specifically) inside UDFs/stored procs.
Tia!
--Michael
I've got a table with a datetime field, and I want to create a Stored Proc that retrieves records 'n' days back using an input parameter. Kind of like this:
input parameter: @tiPastDays INT
declare @dPastDate
@dPastDate = CURRENT_DATE - @tiPastDays
select * from MyTable where...
I have a VFP9 app that runs a SQL Server stored procedure. That stored procedure creates a temporary table (among other things). Right now, I've hardcoded it as ##TempTable, but I want to pass a unique name from my VFP app to the SQL Server proc. That way, I avoid problems by other concurrent...
I'm trying to get a percentage based on one column divided by another. I do this in VFP easily but need to do it now in a SQL Server 2000 stored proc.
Here’s the output from the SP:
cSalesRepID iTotQtyStatused iTotQtySold iTotQtyFinalSold iTotQtyCancelled nPctSold nPctCancelled...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.