elllo there everyone I have a problem with sql within progress. I am using 10.1a and trying to pass run a sql command using a sql communication tool a coworker built. the format looks like this
RUN Comm\msql-dataserv.p(INPUT STRING("SELECT subfile_id, file_path, file_name
FROM web_pub_subfile WHERE (info_card_id =
( SELECT info_card_id
FROM tdc_doc_infocard WHERE (access_category_id IN
( SELECT access_category_id
FROM tdc_doc_accesscattype WHERE (vault_name NOT LIKE '%arc%')
AND (vault_name NOT LIKE '%dft%')))
AND (document_num = 'vDocument')))"),
OUTPUT TABLE tt-row, OUTPUT vError).
except the vDocument I highlighted should pass the literal of the variable vDocument insted it only gets vDocument on the other side. Any help?
I guess it is not really a sql problem but allright, thanks in advace
Jon.
Well ... the first comment is to discourage you from using SQL in this context at all. SQL from within ABL is SQL-89 and is deprecated and missing a great many things from the SQL-92 that one uses on recent versions outside the ABL.
Second, I wonder why you would expect the value to be substituted in a phrase like this. One can do things like
"Some text and a nubmer = " + string(AnInteger) + " and yet some more text"
where AnInteger is a variable with a value, for example, of 99 and end up with a string
Some text and a number = 99 and yet some more text"
which might be more like what you want to do .... given what you are trying to do.
But, all things considered, I would look into dynamic queries for an application like this and do the whole thing in ABL and end up with predictable results.