USE College ; DROP PROCEDURE IF EXISTS Faculty_Before_Insert; DELIMITER $$ CREATE PROCEDURE Faculty_Before_Insert() BEGIN CREATE TRIGGER Review_Email_Before BEFORE INSERT ON Faculty FOR EACH ROW BEGIN DECLARE Email varchar(255); IF Email ! Email FROM Faculty WHERE ID= last_insert_id(); and not declare a local variable.= '^\w (\.\w )* @\w (\.\w ) $' THEN SIGNAL SQLSTATE 'HY000' SET MESSAGE_TEXT= 'This email doesn\'t match First [email protected]'; END IF ; END; END $$ DELIMITER ; INSERT INTO Faculty(Last Name, First Name, Email, Hire Date, Salary, Department ID) VALUES('Stanley', 'Mike', '[email protected]', current_date(), 20000, 1); SELECT Faculty. If you want to make a regular expression matching, use the regexp predicate. = only checks for inequality.) The pattern matching syntax is described at https://dev.mysql.com/doc/refman/5.7/en/@swamp Boogie, Thank you very much for your input, but I figure out a much simpler way to solving my problem AFTER RESEARCHING for hours ONLINE.Actually, it resulted in more errors than using the file generator tool in Test Stand.
The main downside to not using 'Generic Recordset' schema is that the other schemas use GUIDs for primary key values, where the 'Generic Recordset' schema uses an identify key which uses less memory. The strengths and weaknesses you identified were helpful in guiding me to more reading on the subject.Are these some sort of virtual tables that don't actually exist? And, I am running the file in "Microsoft SQL Server Management Studio". PROP_IVEWAVEPAIR So, at this point I might just give up on the stored proc schema, or ignore the warning and hope they won't cause any problems in the future. Hopefully someone who has worked with the stored procedure will reply to this and help. So there was a case where I exported the SQL statements from teststand and tried to run them in SQL server and there were a whole bunch of errors that I had to correct because the syntax wasn't quite right. Teststands stored procedure could have a bunch of errors that you are not aware of. Next, I am pretty sure I am correct about the two numeric limits tables and the two prop tables.Thanks, So, I ran the in the database viewer that comes with Test Stand...result. I have never seen the "missing" tables that the generic recordset schema lists and that has been working fine. Thanks, I am not 100% sure if this pertains to your issue or not. That begin said, I can give you what I think might be issues with the stored procedure. If you somehow export the SQL procedure and try to paste the statement directly into SQL server query and try to run it, I bet there will be errors. There can only be one of them because the stored procedure has errors because there are duplicate key issues going on. I had to correct that when I created my teststand database.Reading through the files there also are no sections related to creating said tables: 1. I am working in My SQL Workbench 6.3 CE and trying to use a trigger inside of a stored procedure to see if it will detect if my email format is not in the right format I specified in the message text error, but I am having trouble because it says a trigger can't be created inside of stored procedure.Email NOT LIKE '%[email protected]%' THEN SIGNAL SQLSTATE VALUE '45000' SET MESSAGE_TEXT= '[table: Faculty]- email column is not valid'; END IF ; END $$ DELIMITER ; INSERT INTO Faculty(Last Name, First Name, Email, Hire Date, Salary, Department ID) VALUES('Seals', 'Daron', '[email protected]', current_date(), 20000, 1); SELECT Faculty. But for my purposes, I won't need anything but a trigger. Unless you could think of a better way of expanding on my answer or is it fine the way it is? Encapsulating database operations in stored procedures has a variety of potential benefits.However, the screen shot of the schema verification tool is after I made the fix. The warnings indicate numerilimit1 and 2 as well as multinumericlimit1 and 2 are missing. My theory is that those tables used to be in the schemas in a prior version of Test Stand but aren't anymore and their appearance in the schemas descriptions are in error, as are the procedures that reference them in the stored proc schema. I have run all of the available test step types at one point or another and the results seem to fit into the database just fine without any of those tables i listed (this is using the genericrecordset, I do not have much experience with the stored proc schema yet). I see that that you are having a problem with the stored procedure.However, when I look at the generic recordset schema those tables are part of the schema but aren't actually there in the database viewer. Get rid of step_numericlimit2 and get rid of prop_multinumericlimit2. I am not going to mislead you in anyway and I am going to tell you right now that I don't have the exact answer for you. Based on what I have learned with the sql query export tool in teststand, it don't think it runs and creates the SQL statements in "pure SQL". It creates it in My SQL or transact SQL or something like that.Since the STEP_RESULT table failed to create, all subsequent references will fail, and this will cascade. I have written a bug tracking issue to change the // comments to -- Scott, I did fix the syntax error on line 51, as noted in the "edit" of my last post. The does not contain any statements to create those tables.This cleared up all of the errors resulting from running the file. If you look at the schema tab under "database options" the schema description lists those tables, but I have never seen them in the actual database.