georeference.org
Subscribe to this thread
Home - Scripting / All posts - How do I concatenate a string in SQL
oisink47 post(s)
#25-Jun-09 03:56

Hi

I have a parameter query as follows:

PARAMETERS SPECIES TEXT;

select [tree_id], [Tree_tag], [SCI_SPECIE], [COM_SPECIE], [height], [DBH], [CONDITION]

from [All Trees Drawing]

where ucase([COM_SPECIE]) like ucase(SPECIES);

If I enter "Oak" as the parameter, it only returns recoreds where Com_Specie='Oak'

but I also want it to return trees say called, 'Red oak'.

I think I need to use a concatenation somehow.

I would normally do something like:

where ucase([COM_SPECIE]) like ucase(' ' & SPECIES & ' ');

but this does not work in the SQL used in Manifold.

Any ideas?

Thanks

Oisin

Lorne

614 post(s)
#25-Jun-09 04:05

Try double quotes: (" " & SPECIES & " ")

oisink47 post(s)
#25-Jun-09 04:12

Thanks

I could have sworn I tried that

0 msec Copyright (C) 2007-2008 Manifold.net. All rights reserved.