Question : A perl problem -- use of global variables.

Hi, I have a script Script1.pl. I want to declare a global variable in Script1.pl and use it in Script2.pl. and Script3.pl which are called from Script1.pl. Is it possible?

I am using system to call Script2.pl and Script3.pl from Script1.pl

like--

system("/usr/bin/perl5.10", "/ms/user/s/sayantag/Script2.pl", $curr_etl, @data);
system("/usr/bin/perl5.10", "/ms/user/s/sayantag/Script3.pl", $curr_etl, @data);

Answer : A perl problem -- use of global variables.

Reworking the query to:
update tempdb..ICG_ENGINES
set COUNT_TBLS_DBS = (
                 SELECT count(distinct d.DbName)
                 from tempdb..DbSize_all d
                 where upper(d.MachName) = tempdb..ICG_ENGINES.SERVERNAME
                 and upper(d.SvrName) = tempdb..ICG_ENGINES.INSTANCE_NAME
                 group by d.MachName, s.SrvName)
should work.
Random Solutions  
 
programming4us programming4us