appending INT to a column name in a trigger
In C I mean like
int i = 1;
printf( "Log_%d", i );
= Log_1
This is what I want to do:
FOR EACH ROW
BEGIN
DECLARE rowNum INTEGER;
SELECT id INTO rowNum FROM status_data limit 1;
IF rowNum<25 THEN
INSERT INTO log_"rowNum" (tension) VALUES (NEW.tension) ;
IF rowNum>25 THEN .....
So when row id=1 I would insert data into log_1 table.
when row id=2 I would insert data into the log_2 table.
Subject
Views
Written By
Posted
appending INT to a column name in a trigger
2533
February 23, 2012 08:34AM
1315
February 23, 2012 08:07PM
1546
February 24, 2012 02:48AM
1349
February 24, 2012 02:54AM
1482
February 24, 2012 03:36AM
1383
February 23, 2012 09:34PM
1560
February 23, 2012 09:47PM
1273
February 23, 2012 09:53PM
1718
February 24, 2012 03:43AM
2064
February 24, 2012 09:54AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.