> 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 || '%');
-
Hi Francis-
Thank you for your rapid and excellent response.
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
Hi Beth,
Try something like this ...
Here's a simple table schema:
CREATE TABLE abbrev (
abbr varchar(10),
long_name varchar(50),
primary key(abbr)
);
Throw in some random data:
INSERT INTO abbrev VALUES ('fs', 'fsolomon');
INSERT INTO abbrev VALUES ('bg', 'bgatewood');
INSERT INTO abbr