Whats problem with this Query?

In this forum we will discuss things relating the ZEOSLib 6.6.x stable versions

Moderators: gto, EgonHugeist

Post Reply
saulofg
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: 25.08.2011, 20:19

Whats problem with this Query?

Post by saulofg »

Whats problem with this Query?

select 'grant exec on ' + 'sp_name' + ' to ' + su.name as granttext
from db..sysobjects so,
db..sysprotects sp,
db..sysusers su
where so.name = 'sp_name '
and sp.id = so.id
and su.uid = sp.uid
order by su.name

on Sybase 12, Delphi 7.

the TZQuery always give a error message:
Row data is not avaliable
User avatar
kaiserilich
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: 19.03.2014, 11:02

Re: Whats problem with this Query?

Post by kaiserilich »

use this

Code: Select all

select 'grant exec on ' + 'sp_name' + ' to ' + su.name as granttext 
from sysobjects so, 
sysprotects sp, 
sysusers su 
where so.name = 'sp_name ' 
and sp.id = so.id 
and su.uid = sp.uid 
order by su.name 
:sorry: for my bad English
Post Reply