gcasa has asked for the wisdom of the Perl Monks concerning the following question:
## Prepare the Select Handle for the Transaction Code in the Descripti +on field my $select_TransactionCode_handle = $db_handle->prepare( qq{ SELECT [Code] FROM [Transaction Code] WHERE [Description] LIKE ? } ); $select_TransactionCode_handle->execute( $transactionCodeQuery . '%' ) +; # THIS DID NOT WORK # $select_TransactionCode_handle->bind_param( 1, $transactionCodeQuery + . '%' ); # THIS ALSO DID NOT WORK # $select_TransactionCode_handle->execute; # $select_TransactionCode_handle->bind_param( 1, $transactionCodeQuery + ); # THIS ALSO DID NOT WORK # $select_TransactionCode_handle->execute( '%' ); ## Grab the Transaction Code if it already exists my @transactionCodes = $select_TransactionCode_handle->fetchrow_array; + # THIS RETURNS undef
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl DBI query of MS SQL with LIKE
by Corion (Patriarch) on May 29, 2023 at 09:45 UTC | |
by Fletch (Bishop) on May 29, 2023 at 11:36 UTC | |
by gcasa (Novice) on May 29, 2023 at 15:56 UTC | |
by gcasa (Novice) on May 29, 2023 at 18:32 UTC | |
|
Re: Perl DBI query of MS SQL with LIKE
by Bod (Parson) on May 29, 2023 at 18:28 UTC | |
|
Re: Perl DBI query of MS SQL with LIKE
by afoken (Chancellor) on May 30, 2023 at 16:36 UTC | |
by Bod (Parson) on May 30, 2023 at 17:24 UTC |