SQL Query Help

Hello Guys,

I am using the following SQL script to get the execution stats for the reports created by querying the SSRS ReportServer:

select username as [User Name], Itempath as [Report Name], parameters as [Variables], timestart as [Execution Start Time], timeend as [Execution End Time], TimeProcessing as [Total Time(ms)], status as [Outcome] from ExecutionLog3
order by TimeStart desc

Open in new window


One of the output columns is this:

/{a42a9aba-ced8-4949-9721-8478f925287a}/biv/aex/aex_reports/process_montitoring_pa_sb_details_pf_vol.rdl
/{3e2d7701-fbda-4c45-b5bd-ef666925e01e}/KPB/RPM_Phase2/Team4_PR05_Reports/Process_Monitoring_FOLD_Quantities_and_Yields_Yield_Ph2A_GMDM.rdl
/{3e2d7701-fbda-4c45-b5bd-ef666925e01e}/KPB/RPM_Phase2/Team7_PR05_Reports/Process_Monitoring_CHRG_Quantities_and_Yields_Yield_Ph2A_GMDM.rdl
/{3e2d7701-fbda-4c45-b5bd-ef666925e01e}/KPB/RPM_Phase2/Team4_PR05_Reports/Process_Monitoring_TFF2_Quantities_and_Yields_Yield_Ph2A_GMDM.rdl
/{d42a1aa2-3237-46f9-8ee3-fd3055f95f65}/sites/pr05_bi/KPB/SolubSulf/SolubSulf PR05 Reports/Process_Monitoring_Quantities_and_Yields_Yield_Ph2A.rdl
/{a42a9aba-ced8-4949-9721-8478f925287a}/biv/fold/fold_reports/process_monitoring_quantities_and_yields_grams_out.rdl

My requirement is just to get the rdl names:

process_montitoring_pa_sb_details_pf_vol.rdl
Process_Monitoring_FOLD_Quantities_and_Yields_Yield_Ph2A_GMDM.rdl
Process_Monitoring_CHRG_Quantities_and_Yields_Yield_Ph2A_GMDM.rdl
Process_Monitoring_TFF2_Quantities_and_Yields_Yield_Ph2A_GMDM.rdl
Process_Monitoring_Quantities_and_Yields_Yield_Ph2A.rdl
process_monitoring_quantities_and_yields_grams_out.rdl

Can I modify the above given SQL code in anyway to get this type requirement attained. Currently I'm using excel for this purpose. Please look into this and suggest an edit in the query.
Eldo issacAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Nathan RileyFounderCommented:
So you want to strip anything before process_monitoring?  Is this always the case?
0
Lokesh B RDeveloperCommented:
Hi,

try this query

SELECT RIGHT(ColumnName , CHARINDEX( '/', REVERSE(ColumnName) + '/' ) - 1 ) AS FileName  FROM  YourTableName

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Eldo issacAuthor Commented:
Hello Guys,

@Nathan: I want to strip everything before the .rdl name.

@Jim: Apologies for my mistake. I'll surely keep this in mind from next time on.

@Lokesh B R: Thanks for your reply. It's working perfect.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2008

From novice to tech pro — start learning today.