Sponsored Content
Top Forums Shell Programming and Scripting How to get a numeric value from Oracle to UNIX variable without spaces? Post 302781489 by Showdown on Saturday 16th of March 2013 05:31:46 PM
Old 03-16-2013
Agreed with CTSGNB u can filter this in oracle itself using trim...
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Strip leading and trailing spaces only in a shell variable with embedded spaces

I am trying to strip all leading and trailing spaces of a shell variable using either awk or sed or any other utility, however unscuccessful and need your help. echo $SH_VAR | command_line Syntax. The SH_VAR contains embedded spaces which needs to be preserved. I need only for the leading and... (6 Replies)
Discussion started by: jerardfjay
6 Replies

2. Shell Programming and Scripting

Replace spaces with 0's having numeric values.

What could be the regular expression with gsub function in awk to replace all numerics having spaces before to be replaced with 0s? (1 Reply)
Discussion started by: videsh77
1 Replies

3. UNIX for Dummies Questions & Answers

How to pass unix variable to oracle

hi , how to pass unix variable to oracle code is ............. #! /bin/ksh echo enter date vale read date1 sqlplus x/y@oracle select * from emp where statrt_date= $date1 is this is correct way... (1 Reply)
Discussion started by: chiru
1 Replies

4. Shell Programming and Scripting

delete spaces in the variable in unix script?

Hi All, I need your help.I want to know how to delete the spaces in a variable in unix scripting.Please give solution to this probelm... thanks ! :confused: (14 Replies)
Discussion started by: MARY76
14 Replies

5. Shell Programming and Scripting

to check variable if its non numeric

if test $b -ne then echo "\n\n\n\tPassword reset has been done successfully" else echo "\n\n\n\tAn error occurred" fi i want to check whether $b is non-numeric so how to do that? (3 Replies)
Discussion started by: sachin.gangadha
3 Replies

6. Shell Programming and Scripting

To get value from oracle & assign it in UNIX variable

Hi Team, I need to get data from oracle table & need to assign that value to unix variable. I have serched the same in other threads. I found the following code. I have tried code to get the value from oracle. but it is not working. The error shows invalid identifier "NAM" & then list all... (5 Replies)
Discussion started by: Amit.Sagpariya
5 Replies

7. Shell Programming and Scripting

Passing unix variable to oracle parameters

Please help me how to pass some unix vairable to oracle. I have used below , but not displaying passed (inval) value. calling() { sqlplus -s $1/$2@$3 <<EOF begin exec call_sql($4); end; exit EOF } calling user pwd inst value1... (17 Replies)
Discussion started by: Jairaj
17 Replies

8. Shell Programming and Scripting

trim spaces in unix for variable

HI Guys I have written a script using awk to split a file based on some identifier and renaming the file based on two values from specific length. ts a fixed width file. When I am trying to fetch the values a = substr($0,11,10) b = substr($0,21,5); i am getting spaces in a and b values .... (6 Replies)
Discussion started by: manish8484
6 Replies

9. Shell Programming and Scripting

How to get Oracle variable in UNIX?

Hello All, I need to export various variables in UNIX. But the values of those variables will come from Oracle. Say i have Oracle query: Select file_id, file_desc, file_freq_cd, load_table_nm, load_stored_procd_nm, load_proc_typ_nm, err_rec_cnt_thrsld_nbr, file_expc_rec_cnt From Table1... (7 Replies)
Discussion started by: Arun Mishra
7 Replies

10. UNIX and Linux Applications

Identify a specific environment Oracle variable to connect a remote Oracle database ?

Good evening I nned your help pls, In an unix server i want to connect to a remote oracle databse server by sqlplus. I tried to find out the user/passwd and service name by env variable and all Ive got is this: ORACLE_SID_REPCOL=SCL_REPCOL ORACLE_SID=xmeta ORACLE_SID_TOL=SCL_PROTOLCOL... (2 Replies)
Discussion started by: alexcol
2 Replies
Data::FormValidator::Filters(3pm)			User Contributed Perl Documentation			 Data::FormValidator::Filters(3pm)

NAME
Data::FormValidator::Filters - Basic set of filters available in an Data::FormValidator profile. SYNOPSIS
use Data::FormValidator; %profile = ( filters => 'trim', ... ); my $results = Data::FormValidator->check( \%data, \%profile ); DESCRIPTION
These are the builtin filters which may be specified as a name in the filters, field_filters, and field_filter_regexp_map parameters of the input profile. Filters are applied as the first step of validation, possibly modifying a copy of the validation before any constraints are checked. RECOMMENDED USE
As a long time maintainer and user of Data::FormValidator, I recommend that filters be used with caution. They are immediately modifying the input provided, so the original data is lost. The few I recommend include "trim", which removes leading and trailing whitespace. I have this turned on by default by using CGI::Application::Plugin::ValidateRM. It's also generally safe to use the "lc" and "uc" filters if you need that kind of data transformation. Beyond simple filters, I recommend transforming the "valid" hash returned from validation if further changes are needed. PROCEDURAL INTERFACE
You may also call these functions directly through the procedural interface by either importing them directly or importing the whole :filters group. For example, if you want to access the trim function directly, you could either do: use Data::FormValidator::Filters (qw/filter_trim/); # or use Data::FormValidator::Filters (qw/:filters/); $string = filter_trim($string); Notice that when you call filters directly, you'll need to prefix the filter name with "filter_". THE FILTERS
FV_split use Data::FormValidator::Filters qw(FV_split); # Validate every e-mail in a comma separated list field_filters => { several_emails => FV_split(qr/s*,s*/), # Any pattern that can be used by the 'split' builtin works. tab_sep_field => FV_split(' '), }, constraint_methods => { several_emails => email(), }, With this filter, you can split a field into multiple values. The constraint for the field will then be applied to every value. This filter has a different naming convention because it is a higher-order function. Rather than returning a value directly, it returns a code reference to a standard Data::FormValidator filter. After successfully being validated the values will appear as an arrayref. FV_replace use Data::FormValidator::Filters qw(FV_replace); field_filters => { first_name => FV_replace(qr/Mark/,'Don'), }, FV_replace is a shorthand for writing simple find-and-replace filters. The above filter would be translated to this: sub { my $v = shift; $v =~ s/Mark/Don/; $v } For more complex filters, just write your own. trim Remove white space at the front and end of the fields. strip Runs of white space are replaced by a single space. digit Remove non digits characters from the input. alphanum Remove non alphanumeric characters from the input. integer Extract from its input a valid integer number. pos_integer Extract from its input a valid positive integer number. Bugs: This filter won't extract "9" from "a9+", it will instead extract "9+" neg_integer Extract from its input a valid negative integer number. Bugs: This filter will currently filter the case of "a9-" to become "9-", which it should leave it alone. decimal Extract from its input a valid decimal number. Bugs: Given "1,000.23", it will currently return "1.000.23" pos_decimal Extract from its input a valid positive decimal number. Bugs: Given "1,000.23", it will currently return "1.000.23" neg_decimal Extract from its input a valid negative decimal number. Bugs: Given "1,000.23", it will currently return "1.000.23" dollars Extract from its input a valid number to express dollars like currency. Bugs: This filter won't currently remove trailing numbers like "1.234". phone Filters out characters which aren't valid for an phone number. (Only accept digits [0-9], space, comma, minus, parenthesis, period and pound [#].) sql_wildcard Transforms shell glob wildcard (*) to the SQL like wildcard (%). quotemeta Calls the quotemeta (quote non alphanumeric character) builtin on its input. lc Calls the lc (convert to lowercase) builtin on its input. uc Calls the uc (convert to uppercase) builtin on its input. ucfirst Calls the ucfirst (Uppercase first letter) builtin on its input. SEE ALSO
o L<Data::FormValidator> o L<Data::FormValidator::Constraints> o L<Data::FormValidator::Filters::Image> - shrink incoming image uploads AUTHOR
Author: Francis J. Lacoste <francis.lacoste@iNsu.COM> Maintainer: Mark Stosberg <mark@summersault.com> COPYRIGHT
Copyright (c) 1999,2000 iNsu Innovations Inc. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms as perl itself. perl v5.14.2 2011-11-25 Data::FormValidator::Filters(3pm)
All times are GMT -4. The time now is 05:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy