Sponsored Content
Full Discussion: compare null with non-null
Top Forums Shell Programming and Scripting compare null with non-null Post 302094980 by nitin on Thursday 2nd of November 2006 10:45:26 AM
Old 11-02-2006
compare null with non-null

I've got a very peculiar situation. I'm trying to find out if we can compare null fields with non-null. I've output csv files from SQL and Oracle. I need to compare each field from the files, and then find out any differences. The files usualy have over 500 fields, and send the resule to DBA.
Here is the intersting part, some fields may have different value, but thats ok. Like time stamps from SQL and Oracle. What I really need is to compare fields with null and non-null values. If SQL has non-null value and corresponding Oracle also has non-null then it's good. Though the values can be different some times. But a null value and same field on other file has non-null value, then I would like to extract that and report.
Any idea or suggestions? I've been looking in to diff, cmp, and even awk.

Thanks in advance

-Nitin
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Null Value

Hello All, I have a file of the format **** 123 abc ABC 456 bcd BCD 789 def 112 ghi GHI 223 jkl 344 mno MNO **** I am trying to extract the lines that have no values in the third field (in this case, this would be 789 def 223 jkl Can anyone please help??... (1 Reply)
Discussion started by: Khoomfire
1 Replies

2. Shell Programming and Scripting

> /dev/null

hello all, In many shell scripts i found '> /dev/null' , i am not able to get this, will any one please explain why we are using this. thanks sudha (2 Replies)
Discussion started by: rrs
2 Replies

3. UNIX for Dummies Questions & Answers

How to compare null and space using single if condition

Hi I have a input file with many fields and each filed will be with in double quotes(""). i want to check fields contains balnk,null or space using condition using if. when i write code as below for if condition its not working a=`awk -F ',' '{gsub("\"", "", $1);'NF==0';printf $1}'... (3 Replies)
Discussion started by: jayakumarrt
3 Replies

4. Shell Programming and Scripting

/dev/null

Hi expert, May I know what is the difference between below cron tab entry ? 0,12 * * * * /abc/myscript.sh > /dev/null 2>&1 0,12 * * * * /abc/myscript.sh (7 Replies)
Discussion started by: olaris
7 Replies

5. Shell Programming and Scripting

/dev/null what is the use of it?

when do you use the path /dev/null (3 Replies)
Discussion started by: webmunkey23
3 Replies

6. UNIX for Advanced & Expert Users

How to Compare Null values??

Hi, Can someone help me comparing Null values. Scenario is as follows: I have a variable which "cache_prd" which can have either some integer or nothing(Null) if it is integer I have to again do some comparision but these comparisons give me this error:( "line 32: [: 95: unary operator... (3 Replies)
Discussion started by: Yagami
3 Replies

7. Shell Programming and Scripting

Insert string 'NULL' where there is a null value

I have an input file having 7 fields delimited by , eg : 1,ABC,hg,1,2,34,3 2,hj,YU,2,3,4, 3,JU,kl,4,5,7, 4,JK,KJ,3,56,4,5 The seventh field here in some lines is empty, whereas the other lines there is a value. How do I insert string NULL at this location (7th loc) for these lines where... (8 Replies)
Discussion started by: zilch
8 Replies

8. UNIX for Dummies Questions & Answers

/dev/null 2>&1 Versus /dev/null 2>1

How are these two different? They both prevent output and error from being displayed. I don't see the use of the "&" echo "hello" > /dev/null 2>&1 echo "hello" > /dev/null 2>1 (3 Replies)
Discussion started by: glev2005
3 Replies

9. Shell Programming and Scripting

Check for null

Hi Champs!!! im a newbie in unix, need ur expert help for my problem... I need to search if there are any "NULL" entries in the string String without Null Str1: 203652|1000003653|tellt|RUPV|4649|1|07/28/2011 01:56:12 String with Null (RUPV is removed) Str2:... (5 Replies)
Discussion started by: guruprasad7
5 Replies

10. Shell Programming and Scripting

Redirecting standard out to /dev/null goes to file "/dev/null" instead

I apologize if this question has been answered else where or is too elementary. I ran across a KSH script (long unimportant story) that does this: if ; then CAS_SRC_LOG="/var/log/cas_src.log 2>&1" else CAS_SRC_LOG="/dev/null 2>&1" fithen does this: /usr/bin/echo "heartbeat:... (5 Replies)
Discussion started by: jbmorrisonjr
5 Replies
SQL::Translator::Parser::Oracle(3pm)			User Contributed Perl Documentation		      SQL::Translator::Parser::Oracle(3pm)

NAME
SQL::Translator::Parser::Oracle - parser for Oracle SYNOPSIS
use SQL::Translator; use SQL::Translator::Parser::Oracle; my $translator = SQL::Translator->new; $translator->parser("SQL::Translator::Parser::Oracle"); DESCRIPTION
From http://www.ss64.com/ora/table_c.html: CREATE [GLOBAL TEMPORARY] TABLE [schema.]table (tbl_defs,...) [ON COMMIT {DELETE|PRESERVE} ROWS] [storage_options | CLUSTER cluster_name (col1, col2,... ) | ORGANIZATION {HEAP [storage_options] | INDEX idx_organized_tbl_clause}] [LOB_storage_clause][varray_clause][nested_storage_clause] partitioning_options [[NO]CACHE] [[NO]MONITORING] [PARALLEL parallel_clause] [ENABLE enable_clause | DISABLE disable_clause] [AS subquery] tbl_defs: column datatype [DEFAULT expr] [column_constraint(s)] table_ref_constraint storage_options: PCTFREE int PCTUSED int INITTRANS int MAXTRANS int STORAGE storage_clause TABLESPACE tablespace [LOGGING|NOLOGGING] idx_organized_tbl_clause: storage_option(s) [PCTTHRESHOLD int] [COMPRESS int|NOCOMPRESS] [ [INCLUDING column_name] OVERFLOW [storage_option(s)] ] nested_storage_clause: NESTED TABLE nested_item STORE AS storage_table [RETURN AS {LOCATOR|VALUE} ] partitioning_options: Partition_clause {ENABLE|DISABLE} ROW MOVEMENT Column Constraints (http://www.ss64.com/ora/clause_constraint_col.html) CONSTRAINT constrnt_name {UNIQUE|PRIMARY KEY} constrnt_state CONSTRAINT constrnt_name CHECK(condition) constrnt_state CONSTRAINT constrnt_name [NOT] NULL constrnt_state CONSTRAINT constrnt_name REFERENCES [schema.]table[(column)] [ON DELETE {CASCADE|SET NULL}] constrnt_state constrnt_state [[NOT] DEFERRABLE] [INITIALLY {IMMEDIATE|DEFERRED}] [RELY | NORELY] [USING INDEX using_index_clause] [ENABLE|DISABLE] [VALIDATE|NOVALIDATE] [EXCEPTIONS INTO [schema.]table] Note that probably not all of the above syntax is supported, but the grammar was altered to better handle the syntax created by DDL::Oracle. AUTHOR
Ken Youens-Clark <kclark@cpan.org>. SEE ALSO
SQL::Translator, Parse::RecDescent, DDL::Oracle. perl v5.14.2 2012-01-18 SQL::Translator::Parser::Oracle(3pm)
All times are GMT -4. The time now is 09:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy