Re: search and replace a SQL query



goldenplec@xxxxxxxxx wrote:
> i want to search through the query and for every placeholder insert a variable

I'm not sure you really want to do what I think you're saying you want
to do, but never mind that...
> <snip>
> $sql =~ s/"?"/$user/;

Question marks are special characters in Perl regular expressions (see
perldoc perlre). If you want to treat them as string literals, you need
to escape them (with backslashes), not quote them:

$sql =~ s/\?/$user/;

Cheers!

.



Relevant Pages

  • Re: Still need help - on form
    ... >I think the command button for the append query may work. ... >though my invoice # in the invoice table is not assigned until the report it ... not sure if there will ever be an invoice generated for that quote. ...
    (microsoft.public.access.forms)
  • Re: Form/subform problems - Newbie
    ... The query can be just... ... Candia Computer Consulting. ... Make sure that the main form query RecordSource is based on just the Quotes table ... When you open the query behind the Quote form, can you manually edit the fields. ...
    (microsoft.public.access.forms)
  • Re: cant get unmatched query to work.
    ... once I applied the query you helped me with I ... as such if a supplier had only submitted a drystone quote the ... to modify my query to find sites suppliers haven't quoted for to one ... have 2 no quote fields for each type of rock. ...
    (comp.databases.ms-access)
  • Re: Selection from multi select list box....
    ... You can still use the approach of creating the Mailing record, and then storing the customers in the mailing. ... the query you created last time: turn it into an Append query (Append ... > there a way to track which customers I sent the quote to (which people> I ...
    (microsoft.public.access.reports)
  • Re: cant get unmatched query to work.
    ... once I applied the query you helped me with I ... as such if a supplier had only submitted a drystone quote the ... the query I get a grayed out box rather than a tick or an empty box ... to modify my query to find sites suppliers haven't quoted for to one ...
    (comp.databases.ms-access)