> Beth Gatewood <[EMAIL PROTECTED]> writes:
> > I hope this isn't because I am using 6.3 (yes...I know it is very very
> > old but this is currently where the data is!)
>
> > here is the query:
> > select * from av34s1 where chromat ~~ ('%' || sample || '%');
> > ERROR: parser: syntax error at o
Beth -
Both errors you describe are due to using 6.3. The first one might work if
you parenthize the repeated use of ||, as so:
select * from av34s1 where chromat ~~ (('%' || sample ) || '%');
Ross
On Thu, Dec 07, 2000 at 01:45:00PM -0800, Beth Gatewood wrote:
> Hi Francis-
>
> Thank you for
Beth Gatewood <[EMAIL PROTECTED]> writes:
> I hope this isn't because I am using 6.3 (yes...I know it is very very
> old but this is currently where the data is!)
> here is the query:
> select * from av34s1 where chromat ~~ ('%' || sample || '%');
> ERROR: parser: syntax error at or near "||"
I
> This makes perfect sense...unfortunately it isn't working...
>
> I hope this isn't because I am using 6.3 (yes...I know it is very very
> old but this is currently where the data is!)
>
> here is the query:
>
> select * from av34s1 where chromat ~~ ('%' || sample || '%');
>
>
> ERROR: pars
Beth Gatewood writes:
> So-If I had a table where I had LONG_NAME and ABBR as attributes.
>
> I want something like
>
> SELECT whatever FROM my_table WHERE long_name LIKE '%[the value of ABBR
> in that row]%';
SELECT whatever FROM my_table a, my_table b WHERE a.long_name like (b.abbr || '%');
-
#x27;||' is the string-concatenation operator.
>
> Hope this helps
>
> Francis Solomon
>
> > -Original Message-
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]]On Behalf Of Beth Gatewood
> > Sent: 07 December 2000 21:06
> > To: [EMA
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Beth Gatewood
> Sent: 07 December 2000 21:06
> To: [EMAIL PROTECTED]
> Subject: [SQL] trying to pattern match to a value contained
> in a column
>
>
> Hi-
>
> I can't figure out how to do this
Hi-
I can't figure out how to do this
I examine a table where I think that one attribute is an abbreviation of
another attribute.
So-If I had a table where I had LONG_NAME and ABBR as attributes.
I want something like
SELECT whatever FROM my_table WHERE long_name LIKE '%[the value of ABBR