Home » SQL & PL/SQL » SQL & PL/SQL » Loop Through a String
Loop Through a String [message #222022] Thu, 01 March 2007 08:33 Go to next message
kelliherj
Messages: 11
Registered: October 2006
Location: Killarney
Junior Member
Hi,

I have to write a new procedure for an Electronic File Transfer.
I had it meeting all the requirements when the users, who are an external agency to our client, added a new feature to the funcionality. Esentially it is a calculation which will be included on the file and matched against the same calculation when the file is received to ensure it is secure.

Basically I have a string value say 150 characters long for example. Each letter, number and character in the csv file is assigned a contstant value. This is multiplied by its position in the string and all the values are summed at the end.

I have set up a for loop but what I want to know is how do you loop through each individual character in the supplied string?

Any help would be geatly appreciated.

Regards,

kelliherj
Re: Loop Through a String [message #222033 is a reply to message #222022] Thu, 01 March 2007 08:57 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Just use SUBSTR and increase the starting position as you go throught the loop.

Have you considered using something more standard, like a MD5 hash (provided in dbms_obsfuscation_toolkit)?
Re: Loop Through a String [message #222046 is a reply to message #222022] Thu, 01 March 2007 09:20 Go to previous message
kelliherj
Messages: 11
Registered: October 2006
Location: Killarney
Junior Member
Thanks I'll try that!
Previous Topic: Date Validation
Next Topic: Insert multiple Picture in a table
Goto Forum:
  


Current Time: Sun Dec 04 16:25:49 CST 2016

Total time taken to generate the page: 0.16920 seconds