All Forums Database
NMadson-3173 44 posts Joined 09/06
12 Apr 2009
variable in a SAMPLE clause in a stored procedure

Can one use a variable in a SAMPLE clause in a stored procedure?If so, is there any special syntax?I've declared my input variables as SMALLINT (& tried INTEGER).My query is INSERT INTO fooSELECT fooSAMPLE :sample_size_in;I get an error message "...expected something like an integer or decimal or floating point number or a 'WHEN' keyword...."TIA,Nolan

maddy@1 6 posts Joined 05/08
14 Apr 2009

HiCan I get the exact CREATE PROCEDURE statement you entered.Because stored procedures accept variables.for example,creat procedure input_variables(IN variable1 INTEGER)beginupdate table_1 set salary=100where col_1 = :variable_1;end;call input_variables(12);

You must sign in to leave a comment.