my $agentnum = $opt{agentnum};
my $q = $opt{ignore_quantity} ? '1' : 'COALESCE(cust_pkg.quantity, 1)';
- my $censustract = "replace(cust_location.censustract, '.', '')";
+ my $censustract = "substr( replace(cust_location.censustract, '.', ''), 1, 11)";
my @select = (
"$censustract AS censustract",
my $date = $opt{date} || time;
my $agentnum = $opt{agentnum};
my $q = $opt{ignore_quantity} ? '1' : 'COALESCE(cust_pkg.quantity, 1)';
- my $censustract = "replace(cust_location.censustract, '.', '')";
+ my $censustract = "substr( replace(cust_location.censustract, '.', ''), 1, 11)";
my @select = (
"$censustract AS censustract",