 |
Elif Newbie
Joined: 18 Aug 2004 Posts: 2
|
Posted: Sun Apr 17, 2005 8:13 pm
mapquert |
i have an alias like this.
#mapquery {"[Name] LIKE '%@roomname%'"}
if rooname is gates of soros it works
but when its gate's of soros dont work. do you know why? |
|
|
 |
jessew Apprentice
Joined: 03 Mar 2003 Posts: 141
|
Posted: Sun Apr 17, 2005 11:32 pm |
I believe you have to escape that single quote , and I think you do this in an sql statement by doubling the single quotes. (far from a guru with sql)
try this when you call it instead (might want to write an alias)
#mapquery {[Name] LIKE '%%replace(@roomname,"'","''")%'}
maybe someone else knows an easier way |
|
_________________ I love deadlines. I like the whooshing sound they make as they fly by. |
|
|
 |
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sun Apr 17, 2005 11:35 pm |
Either the % symbols are interfering (not likely, that's part of SQL syntax, right?) or the single quote is. To fix the latter, you probably will have to use some kind of bracketing/quoting or maybe just remove it from the name altogether.
I have no idea if it'd work, but you might also try fooling around with %expand(). |
|
_________________ EDIT: I didn't like my old signature |
|
|
 |
nexela Wizard

Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Mon Apr 18, 2005 2:01 am |
Quote: |
#mapquery {[Name] LIKE '%%replace(@roomname,"'","''")%'} |
Actually wont work due to the %%
#mapquery {[Name] LIKE '%char(37)%replace(@roomname,"'","''")%'}
Alternativly you could use an ugly concat statement but this works :p |
|
|
 |
Elif Newbie
Joined: 18 Aug 2004 Posts: 2
|
Posted: Mon Apr 18, 2005 4:32 pm |
its worked thanks a lot
|
|
|
 |
|
|