Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

text database override for run map

Status
Not open for further replies.

mjnaaktgeboren

Technical User
Jun 22, 2004
21
0
0
US
Help!!!!

I am trying to override some sql variables, and I can override the numerics with no problem, I can pass text no problem, but the issue is that I have to override the sql with a TEXT field containing the ' character because I am accessing an oracle database.

Anyone have any ideas? I made an SQL workaround and used numerics....
So I have a working code and solution, but I want to know how to do this. Running Merc 6.7

Result
RUN(G:\Mercator\test\maps.src\5140_create_ESPP_file.mmc, -ID1 ' -VAR
DATE1=1040295 -VAR DATE2=104303 -VAR WCKNO=609529 -VAR MCKNO=508630 -VAR
TYPE='W'')

Gives RC 56 - Mercator thinks the command is done.


Source

=RUN(GETDIRECTORY() + "5140_create_ESPP_file.mmc",
" -ID1 "+ SYMBOL(39) + " -VAR DATE1=" +
put_function misc_elements [1]:date_parms +
" -VAR DATE2=" + put_function
misc_elements [2]:date_parms +
" -VAR WCKNO=" + put_function
misc_elements [3]:date_parms +
" -VAR MCKNO=" + put_function
misc_elements [4]:date_parms +
" -VAR TYPE=" + SYMBOL(39) +
put_function misc_elements [7]:date_parms + SYMBOL(39) + SYMBOL(39) )

 
I figured it out - you have to use the ' char in the sql/mdq file.

ie
Select * from MyTable
where AbbrevCol = '#TYPE#'


Thanks all
 
Don't you just love syntax? If the darn machine is smart enough to know the syntax is bad, it should fix it for you and let you know what it did.



BocaBurger
<===========================||////////////////|0
The pen is mightier than the sword, but the sword hurts more!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top