i am trying to write a program that will query the database and thereafter update all the firstnames of the clients in the database to the first character of the firatname e.g a name in the database like vernon should now be v.this kind of a program should iterate through all the names in that database and update them accordingly.
what i need is the logic that will make the program to go to the first record of the database,check the firstname and update it,then move on to the next record,do the same until it reaches the last record.
waiting to hear from you soon.
[Bear edit: removed shouting from subject line; please note that you will find the caps lock key to the left of the A key] [ January 17, 2005: Message edited by: Bear Bibeault ]
You're unlikely to hear much with this type of question.
You'd get much better response by posting what work you have done so far, and asking questions about the aspects of it that are giving you trouble. You are unlikely to find someone willing to just write all the code for you.
The following won't take the steps that you asked for (query, select names, iterate row-by-row, etc), but it has the same effect in the end. Oh, and it's Oracle-specific.Also, the second 1 in the substr call may need to be 2 if the end index is exclusive. I don't remember of the top of my head.
subject: Replacing name with first character in the DB