celliott has asked for the wisdom of the Perl Monks concerning the following question:
Hi im new to this website and fairly new to perl. here is my code first and output.
here is my output: F01212 F01213 G01212 My problem is i only want the F labels if they dont exist in the G labels so in this case i would want my ouput to be F01213. Sorry if this is long winded. thanks for any help.my @label = ( "F%", "G%" ); my $str = $dbh->prepare( "SELECT ID, NUM FROM INDEX WHERE ID like ? ); for ( @label ) { $str->bind_param( 1, SQL_VARCHAR ); $str->execute(); my ( $label, $num ); $str->bind_column( undef, \$label, \$num ); while( $str->fetch() ) { print "$label $num\n"; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Sort label
by gryphon (Abbot) on Jul 17, 2005 at 21:59 UTC | |
Re: Sort label
by jdporter (Paladin) on Jul 18, 2005 at 01:30 UTC | |
Re: Sort label
by graff (Chancellor) on Jul 18, 2005 at 03:00 UTC | |
Re: Sort label
by Roy Johnson (Monsignor) on Jul 18, 2005 at 14:00 UTC |
Back to
Seekers of Perl Wisdom