06-18-2011
Here, an extra digit is getting added! I guess the user want the number to be intact and only that the last digit should have a period before it.
regards,
Ahamed
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I sometimes bulk upload data in oracle. The problem is that I sometimes get an INSERT statemnt like this:
INSERT INTO ALL_USER_HOTSPOT_DETAILS (USR_LOGIN,USR_LASTNAME,USR_FIRSTNAME,USR_EMAIL,
PROPERTYNR)
VALUES ('SABRDAG','D'AGOS','SABRINA','sabrina_d'agos@sheraton.com',70)
I... (4 Replies)
Discussion started by: nattynatty
4 Replies
2. Shell Programming and Scripting
Hi,
Can some1 help me to output a tab in an echo statement.
I have tried
echo "RNC: \t NODEB"
but dont get the correct output.
I am a beginnger to unix, so pls hold back the laughs....if u can (5 Replies)
Discussion started by: sunils27
5 Replies
3. Shell Programming and Scripting
Hi
I have a text file , contents are
Line1:field1,field2,field3,field4,field5,field6.......field20
Line2:field1,field2,field3,field4,field5,field6.......field20
Line3:field1,field2,field3,field4,field5,field6.......field20
....and so on...
I want to read this file and insert the data into... (4 Replies)
Discussion started by: Amruta Pitkar
4 Replies
4. Shell Programming and Scripting
Hi All,
I am using Unix ksh script.
I need to insert values to a table using the o/p from a slelect statement.
Can anybody Help!
My script looks like tihs.
---`sqlplus -s username/password@SID << EOF
set heading off
set feedback off
set pages 0
insert into ${TB_NAME}_D... (2 Replies)
Discussion started by: nkosaraju
2 Replies
5. Shell Programming and Scripting
hi,
When i try to run the code below, i get the following error
"ksh: syntax error: `(' unexpected"
i am not able to figure it out. Can anyone help me?
Code: (2 Replies)
Discussion started by: ragavhere
2 Replies
6. Programming
I have a form , where i will put the values to a table.
I wrote a insert statement for the same.
Table structure is
ename | character varying(30) |
eadd | character varying(30) |
eid | integer |
sal | integer
In the statements, i don't... (1 Reply)
Discussion started by: pritish.sas
1 Replies
7. Programming
Hello,
Can anyone tell me that,
How can I assign variable to shell script variable, which i need to use in INSERT INTO statement?
my shell script variables are,
EMPNAME=`regular expression`
EMPID=`regular expression`
EMPBDATE=`regular expression`
Now through ksh script I am... (16 Replies)
Discussion started by: Poonamol
16 Replies
8. Shell Programming and Scripting
Hi Guys,
Can somebody help me in inserting today's DATE format (20110709) in my awk statement. I have a script but its not working.
inputfile.txt:
269,1,0,AAA,430
231,2,0,BBB,430
252,3,0,CCC,430
214,4,0,DDD,430
script.sh
#!/bin/bash
DATE="`date +%Y%m%d`"
cd /var/opt/ (8 Replies)
Discussion started by: pinpe
8 Replies
9. Shell Programming and Scripting
Hi folks,
I have a scenario to convert the update statements into insert statements using shell script (awk, sed...) or in database using regex.
I have a bunch of update statements with all columns in a file which I need to convert into insert statements.
UPDATE TABLE_A SET COL1=1 WHERE... (0 Replies)
Discussion started by: dev123
0 Replies
10. Shell Programming and Scripting
I have a file contains thousands of lines. I want to insert n random numbers into each line at
specific position. Like this:
0 22……
1 33……
……
……
I want to insert 3 random numbers from position 2 to 4 into each line.
0 325 22……
1 685 33……
……
……
Please use CODE tags when... (8 Replies)
Discussion started by: hhdzhu
8 Replies
LEARN ABOUT DEBIAN
algorithm::checkdigits::m11_003
CheckDigits::M11_003(3pm) User Contributed Perl Documentation CheckDigits::M11_003(3pm)
NAME
CheckDigits::M11_003 - compute check digits for PKZ (GDR)
SYNOPSIS
use Algorithm::CheckDigits;
$pkz = CheckDigits('pkz');
if ($pkz->is_valid('150765400354')) {
# do something
}
$cn = $pkz->complete('15076540035');
# $cn = '150765400354'
$cd = $pkz->checkdigit('150765400354');
# $cd = '4'
$bn = $pkz->basenumber('150765400354');
# $bn = '150765400354'
DESCRIPTION
ALGORITHM
1. The checkdigit is set to 0.
2. From right to left the digits are weighted (multiplied) with 2,4,8,5,10,9,7,3,6,1,2,4.
3. The products are added.
4. The sum of step 3 is taken modulo 11.
5. The value of step 4 is added to a multiple (0..9) of the weight of the checkdigit(2).
6. The sum of step 5 is taken modulo 11.
7. The checkdigit is the multiple of the weight of the checkdigit where the value of step 6 equals 10.
8. If there can't be reached a value of 10 in step 6, the number cannot be taken as a PKZ.
To validate a PKZ apply steps 2 to 4 to the complete number.
METHODS
is_valid($number)
Returns true only if $number consists solely of numbers and the last digit is a valid check digit according to the algorithm given
above.
Returns false otherwise,
complete($number)
The check digit for $number is computed and concatenated to the end of $number.
Returns the complete number with check digit or '' if $number does not consist solely of digits and spaces.
basenumber($number)
Returns the basenumber of $number if $number has a valid check digit.
Return '' otherwise.
checkdigit($number)
Returns the checkdigit of $number if $number has a valid check digit.
Return '' otherwise.
EXPORT
None by default.
AUTHOR
Mathias Weidner, <mathias@weidner.in-bad-schmiedeberg.de>
SEE ALSO
perl, CheckDigits, www.pruefziffernberechnung.de.
perl v5.10.0 2008-05-17 CheckDigits::M11_003(3pm)