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