Closed boekhold closed 1 year ago
Seems to come from this commit: https://github.com/vonloxley/sqsh/commit/bdec3b8f787c046cef5640a06bfba200e97d015a
I've figured it out. I need to "escape" the single quotes using double-back-slashes like:
\func -x \tables
\if [ $# -ne 1 ]
\echo "usage: \tables <partial table name>"
\return 1
\fi
select u.name, substring(o.name, 1, 64)
from sysobjects o, sysusers u
where o.type = 'U'
and o.name like \\'%${1}%\\'
and o.uid = u.uid
order by 2 asc
go
\done
Closing the issue.
Hi,
When I used sqsh 2.5.16.1 with Sybase, I could use a \func definition such as:
And it would give me a list of tables having
Data
in their name, plus the user who owns it.This does not work anymore, because the
${1}
isn't getting expanded to the provided value in the current version. Seems at some time some logic was introduced to NOT expand variables that are enclosed by single quotes?This basically makes it impossible for me to pass filter conditions to a function...
If you don't have time to look into this, perhaps you can only point me to the correct code location so I can attempt a fix on my own?