Sponsored Content
Full Discussion: If Then Else Logic
Top Forums UNIX for Dummies Questions & Answers If Then Else Logic Post 302146675 by jadionne on Wednesday 21st of November 2007 08:02:32 PM
Old 11-21-2007
If Then Else Logic

I am obviously new to Unix Script writing, and I think I am trying to do this in SQL when im not in a SQL environment. What I need to do is the following

Code:
EXTRACT_ROW_COUNT=`grep Number $REFERENCE_LOG"extract_concern.log" | sed '/Number of rows exported:/s/.*:[^0-9]*\([0-9][0-9]*\)$/\1/'`
LOADED_ROW_COUNT=`db2 -x "select count(*) from CENREF.REF_CONCERN_LU_TBL_B"`

IF $EXTRACT_ROW_COUNT <> 0 and $EXTRACT_ROW_COUNT = $LOADED_ROW_COUNT 
THEN nohup $REFERENCE_SCRIPT"renme_ref_concern.sh" & 
ELSE echo "LOAD INCOMPLETE" > $REFERENCE_LOG"CONCERN_LOAD_FAILURE.LOG" 
end IF


I have been studing the IF man pages but they dont seem to do what I need. Im probably overlooking something, can you point me in the right direction?
 

We Also Found This Discussion For You

1. UNIX for Dummies Questions & Answers

Need help in logic

I have big large snapshot file which contains every process start time and end time. One server snapshot contains many Application handle. My task is to identify the process id for which the end time is not there or empty also if the completion time is not on the same date then I need to kill. ... (6 Replies)
Discussion started by: senthilkumar_ak
6 Replies
SQL::ReservedWords::SQLServer(3pm)			User Contributed Perl Documentation			SQL::ReservedWords::SQLServer(3pm)

NAME
SQL::ReservedWords::SQLServer - Reserved SQL words by SQL Server SYNOPSIS
if ( SQL::ReservedWords::SQLServer->is_reserved( $word ) ) { print "$word is a reserved SQL Server word!"; } DESCRIPTION
Determine if words are reserved by SQL Server. METHODS
is_reserved( $word ) Returns a boolean indicating if $word is reserved by SQL Server 7, 2000 or 2005. is_reserved_by_sqlserver7( $word ) Returns a boolean indicating if $word is reserved by SQL Server 7. is_reserved_by_sqlserver2000( $word ) Returns a boolean indicating if $word is reserved by SQL Server 2000. is_reserved_by_sqlserver2005( $word ) Returns a boolean indicating if $word is reserved by SQL Server 2005. reserved_by( $word ) Returns a list with SQL Server versions that reserves $word. words Returns a list with all reserved words. EXPORTS
Nothing by default. Following subroutines can be exported: is_reserved is_reserved_by_sqlserver7 is_reserved_by_sqlserver2000 is_reserved_by_sqlserver2005 reserved_by words SEE ALSO
http://msdn2.microsoft.com/en-us/library/ms130214.aspx AUTHOR
Christian Hansen "chansen@cpan.org" COPYRIGHT
This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.8.8 2008-03-28 SQL::ReservedWords::SQLServer(3pm)
All times are GMT -4. The time now is 04:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy