我有这个问题:
Select
'<ALL>' as name,
'<ALL>' as pid,
'<ALL>' as type
union all
Select distinct
instructor.name as name,
instructor.Pid as pid,
instructor_type as type
From sisinfo.dbo.SISCRSI instructor
inner join section_info as section
on section.sctn_id_code = instructor.sctn_id_code
Where section.sctn_term_code in (@Terms)
and section.subj_code in (@Subject)
order by name
Run Code Online (Sandbox Code Playgroud)
当我在SSMS中运行它时,它在非常接近零的时间内完成.当我为它提供一些值时,它也在SSRS查询设计器中快速运行.但是当我预览报表时,查询至少需要两分钟才能运行.我不确定这里发生了什么,我以前从来没有遇到SSRS这样的问题.
我在django中遇到这个错误:
AttributeError at /
'str' object has no attribute '_meta'
Request Method: GET
Request URL: http://localhost:8000/
Django Version: 1.3
Exception Type: AttributeError
Exception Value:
'str' object has no attribute '_meta'
Exception Location: C:\Python27\lib\site-packages\django\contrib\admin\sites.py in register, line 80
Python Executable: C:\Python27\python.exe
Python Version: 2.7.2
Python Path: ['D:\\programming\\django_projects\\ecomstore',
'C:\\Python27\\lib\\site-packages\\setuptools-0.6c9-py2.7.egg',
'C:\\Python27\\lib\\site-packages\\pymysql-0.3-py2.6.egg',
'C:\\Windows\\system32\\python27.zip',
'C:\\Python27\\DLLs',
'C:\\Python27\\lib',
'C:\\Python27\\lib\\plat-win',
'C:\\Python27\\lib\\lib-tk',
'C:\\Python27',
'C:\\Python27\\lib\\site-packages',
'C:\\Python27\\lib\\site-packages\\PIL']
Server time: Fri, 13 Jan 2012 16:44:18 +0500
Run Code Online (Sandbox Code Playgroud)
如果我注释掉这个错误就不会发生,我admin.autodiscover()也在django中使用了ModelForm,所以是因为ModelForm?以下是ModelForm代码:
from django import forms
from catalog.models import Product
class ProductAdminForm(forms.ModelForm):
class Meta:
model=Product …Run Code Online (Sandbox Code Playgroud)