Query inside mbcxp_AgingVisit Stored Procedure - sql

I am working on a report called Aging by Patient and the query that I have is calling the stored procedure mbcxp_AgingVisit. I need the query inside the stored procedure but can't seem to find it anywhere. I googled it and saw that others are working on reports with mbcxp_AgingVisit so I was wondering if someone has a copy of the stored procedure.
I hope I make sense and any response will be greatly appreciated. Thanks!

Go to your database where the stored procedure is installed -> Progammability -> Stored Procedures -> Modify.

Related

How to simply track when a Stored Procedure is run

I saw an article posted by Aaron Bertrand (very active here) about how to add some simple logging tracking. Hoping for a bit of help. Article is here: https://www.mssqltips.com/sqlservertip/2003/simple-process-to-track-and-log-sql-server-stored-procedure-use/#comments
I need help with what code to use to call and populate the logging table info and where to put it in each stored procedure.
I created a table dbo.ProcedureLog and a stored procedure Log_ProcedureCall.
I just need some guidance on what to enter in my actual procedures. I am not using any error catching. I just need the following:
Time procedure was called.
Procedure name
Thanks!
Add an INSERT statement to your procedures to write to the ProcedureLog.

SQL Server query execution plan for stored procedure references table that does not exist in code

Using Microsoft SQL Server 2012
I have a graphical query plan for a stored procedure. In one part of the procedure the plan makes reference to a table (not a view or function) that doesn't exist within the stored procedure. I've gone through the stored procedure line by line, checked tables to see if triggers had been defined on them and still I can't find the table name the query plan is making a reference to.
Has anyone ever come across this? Is this a bug or am I missing something obvious.
Thanks!

Executing Stored Proc in Pervasive Control Center

I am relatively new to Pervasive Control Center and I was wondering if I wanted to test a stored Procedure to see its results, how would I simply select that stored proc? I have:
Select SP_test_getMeasure06
I am sure I am missing something because I know this is legal my syntax must be off slightly.
Thanks in advance!
You can execute a stored procedure using either Call or Exec. For example:
exec SP_test_getMeasure06
You'll need to make sure your stored procedure uses the RETURNS clause to get data back. For more information check out the Stored Procedure docs.

List of stored procedure which using another stored procedure

We have almost 2100+ stored procedure in database. we are not able to check each stored procedure to find out whether it is using another stored procedure or not.
Any query to find out same?
Thanks,
Dhruval Shah
As long as you don't have dynamic SQL code, you can get the dependencies from SQL Server.
This article explains it pretty well.
You could use the free SQL Search tool from Red Gate

Trace what DB a stored Procedure is located from a script

is there a way to make a query which DB the Stored Procedure is located? I got this bunch of Databases doing a lot of Cross DB query from each other, now I got lost with 1 stored procedure and I just want to look from which DB it is located. I want to make a script that will return the DB name of where that stored procedure is located.
Is this possible?
Look to this question Query to list all stored procedures