On Oct 2, 6:06 pm, "Friedman, Jason" <[EMAIL PROTECTED]>
wrote:
> I have lines that look like this:
> select column1, 'select' as type
> from table
> where column2 = 'foo'
>
> I want to return:
> SELECT column1, 'select' AS type
> FROM table
> WHERE column2 = 'foo'
>
> This is SQL with the keywords
On Oct 2, 4:03 pm, [EMAIL PROTECTED] wrote:
> Jason> With Perl I might do something like this:
> Jason> $line =~ s/(select)/uc($1)/e;
> ...
> Jason> How would I do this with Python?
>
> I'm sure there are plenty of ways to skin this particular cat, but how is
> 's/.../.../e' differe
Jason> With Perl I might do something like this:
Jason> $line =~ s/(select)/uc($1)/e;
...
Jason> How would I do this with Python?
I'm sure there are plenty of ways to skin this particular cat, but how is
's/.../.../e' different from 's/.../.../'? (For those of us who are not
Perl
On Oct 2, 1:06 pm, "Friedman, Jason" <[EMAIL PROTECTED]>
wrote:
> I have lines that look like this:
> select column1, 'select' as type
> from table
> where column2 = 'foo'
>
> I want to return:
> SELECT column1, 'select' AS type
> FROM table
> WHERE column2 = 'foo'
>
> This is SQL with the keywords
Friedman, Jason wrote:
> I have lines that look like this:
> select column1, 'select' as type
> from table
> where column2 = 'foo'
>
> I want to return:
> SELECT column1, 'select' AS type
> FROM table
> WHERE column2 = 'foo'
>
> This is SQL with the keywords converted to uppercase. Note that th