how can we skip the multi load statement if the file is empty
Teradata Teradata Discussion Forums Teradata.com Discussion Forum
Visit Teradata.com
Home       Guidelines    Member List
Welcome Guest ( Login | Register )
        


This online forum is for user-to-user discussions of Teradata products, and is not an official customer support channel for Teradata. If you require direct assistance, please contact Teradata support.


how can we skip the multi load statement if... Expand / Collapse
Author
Message
Posted 11/23/2008 11:59:23 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 11/24/2008 10:31:45 PM
Posts: 4, Visits: 4
Hi
I am new to teradata. I am using Teradata on unix. I am facing some problem. can anyone help me please.

this is the problem.

how can we skip the multi load statement if the file is empty.

grep 'test' file1> file2

mload statement with file2



Thanks,
Rajesh


Post #13664
Posted 11/24/2008 4:12:17 PM
Forum Member

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member

Group: Forum Members
Last Login: 9/9/2009 2:15:41 PM
Posts: 25, Visits: 115
grep 'test' file1> file2
if [ `wc -l file2` -gt 0 ] ; then
mload statement with file2
fi;

Basically this checks the file 'file2' has at least one row - you cold also use onee of the other wc options to check for characters if your file has a data row without any text.

Check 'man wc' for all the options.
Post #13673
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 ( 0 guests, 0 members, 0 anonymous members )
No members currently viewing this topic.


All times are GMT -5:00, Time now is 11:52am

Powered By InstantForum.NET v4.1.4 © 2009
Execution: 0.141. 10 queries. Compression Disabled.