Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

select where function very slow.. alternatives for simple asp.net page?

$
0
0

This is very slow:

select * from apt_files_detailed where apt_department = [dbo].APT_GetDept ('domain\jdoe')

yet these are not:

select * from apt_files_detailed

and

select [dbo].APT_GetDept('domain\jdoe')

I need to be able to select inline inside an ASP.NET page where I don't have codebhind access. Rather not use a stored procedure unless I can select from it directly in the control. Also must pass the user parameter in.

Also, in ASP.NET can I do this in the markup (it's for a SharePoint 2007 page):

SelectCommand="SELECT * FROM [APT_Files_Detailed] where [apt_department] = [dbo].apt_Getdept (@context)"

WebPartPages:DataFormParameter ParameterKey="LOGON_USER" PropertyName="ParameterValues" Name="context"*

It's for a sharePoint 2007 page, Just not sure if it should be (@context) or ('@context') .. idk if having syntax issue as the page times out anyways.

Thanks.


============================
Thank You
cyberpine.com






Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>