Mass Approval and Moving of Messages with SQL? [message #35943] |
Thu, 22 February 2007 13:26 |
appscontent
Messages: 33 Registered: November 2006
Karma:
|
Member |
|
|
I have successfully converted and loaded historical data via an API. The messages appear in the moderation queue and are awaiting approval.
My requirement ... mass approve the 14,000+ messages still appearing in the queue while additionally have them moved to a new forum that will hold just the unedited, archived data.
I am looking for confirmation and help with the SQL since I am not really a technical person. I believe I need to do the following:
1. query all rows in FUD26_MSG where APR = 0 and set APR=1
2. for each row changed above, also change the column that holds the foreign key to FUD26_FORUM.
Looking at my raw data, I see that column FILE_ID in FUD26_MSG may be the field I also need to change. My question is this ... my FORUM_ID values are 4, 5, 6, etc. yet FILE_ID = 40000, 50000, 60000, etc.
a. Is this the right column to change? If I wanted to move a message in forum 4 to forum 5 would I change FILE_ID from 400000 to 500000?
3. Run the consistency checker after executing and committing the SQL
Is my analysis correct?
Could anyone write the simple SQL to do this so I can verify if my is correct?
|
|
|