You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sp_helptext: Will return the value for an overloaded procedure, but this is not easily queryable
sql_modules or INFORMATION_SCHEMA is the preference according to SQL Server docs; however, it does not work for overloads
select object_name(object_id), definition
from sys.sql_modules as m
join sys.procedures as p
on m.object_id = p.object_id
syscomments does work (similar to Sybase ASE); however, we'd need to update the AbstractDbMetadataDialect class and add a method like searchExtraRoutineInfo (akin to searchExtraViewInfo)
select obj.name name, com.number number, obj.type, com.texttype
--, colid2 colid2
, colid colid, text text
from dbdeploy03..syscomments com
, dbdeploy03..sysobjects obj
, dbdeploy03..sysusers sch
where com.id = obj.id
and obj.uid = sch.uid and sch.name = 'dbo'
and obj.type in ('P','FN')
and com.texttype = 0
order by com.id, number
--, colid2
, colid
The text was updated successfully, but these errors were encountered:
Search GITHUB#7 in code for examples
Update 2017-11-18: A few thoughts
sp_helptext: Will return the value for an overloaded procedure, but this is not easily queryable
sql_modules or INFORMATION_SCHEMA is the preference according to SQL Server docs; however, it does not work for overloads
select object_name(object_id), definition
from sys.sql_modules as m
join sys.procedures as p
on m.object_id = p.object_id
select obj.name name, com.number number, obj.type, com.texttype
--, colid2 colid2
, colid colid, text text
from dbdeploy03..syscomments com
, dbdeploy03..sysobjects obj
, dbdeploy03..sysusers sch
where com.id = obj.id
and obj.uid = sch.uid and sch.name = 'dbo'
and obj.type in ('P','FN')
and com.texttype = 0
order by com.id, number
--, colid2
, colid
The text was updated successfully, but these errors were encountered: