 |
doomfyre Apprentice
Joined: 03 Jan 2002 Posts: 152 Location: USA
|
Posted: Tue Nov 09, 2004 4:54 am
making a #mapquery alias |
I know this is insanely simple, i just cant get my syntax right....
All i want to do is have an alias, mq, that will #MAPQUERY on %1.
Here's what i did:
#ALIAS mq {#MAPQUERY {[Name] LIKE '%%1%'}}
typing mq Crypt show's totally different results than typing out the full #MAPQUERY {[Name] LIKE '%Crypt%'} at the command line
I know it has something to do with the % signs, just not sure what to do here.
Thanks |
|
|
 |
mortie Wanderer
Joined: 26 Sep 2002 Posts: 73 Location: United Kingdom
|
Posted: Tue Nov 09, 2004 7:53 am |
Heya,
Try
#ALIAS mq {#mapquery {[Name] LIKE '%"%-1"%'}}
I use %-1 so i can search on more than one word |
|
|
 |
doomfyre Apprentice
Joined: 03 Jan 2002 Posts: 152 Location: USA
|
Posted: Tue Nov 09, 2004 1:38 pm |
That works, thanks Mortie.
I always read about %-1 being unsupported though. Is there a "right" way to do it? I'll definitely use this, just wanna know the "other" way too, for future reference. |
|
|
 |
nexela Wizard

Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Tue Nov 09, 2004 2:39 pm |
say %-1 is correct and documented for #Aliases
|
|
|
 |
Danlo Magician

Joined: 28 Nov 2003 Posts: 313 Location: Australia
|
Posted: Tue Nov 16, 2004 6:02 pm |
%param(0) is the "right" way.
|
|
|
 |
|
|