Hey people,
i need help I am created a website that is a information system That gives information to my clients. Can some please suggest me to speed up the search process b'coz at some point i'm getting "SQL Server timeout expired "
while getting a the data on a temp table The data is visible when refreshed so Please help on the same Please
This is the query i am using
i need help I am created a website that is a information system That gives information to my clients. Can some please suggest me to speed up the search process b'coz at some point i'm getting "SQL Server timeout expired "
while getting a the data on a temp table The data is visible when refreshed so Please help on the same Please
This is the query i am using
Code:
sql = " SELECT isnull(userdatacomment,'NONE') as comment, Asset_Detail.Asset_serial_no,Asset_Detail.Asset_id, " &_ " Asset_Detail.Asset_barcode_no, " &_ " Asset_Detail.Asset_description, Asset_Type.Asset_type_description, " &_ " assettypesub.assettypesubdesc, " &_ " Asset_Detail.Asset_contract_no,Asset_Detail.Asset_Rental,Asset_Detail.Asset_type_id, " &_ " state.statedesc,Asset_Detail.Asset_purchase_date,Asset_Detail.Asset_PO_no, " &_ " isnull(Asset_Detail.Asset_purchase_price,0) Asset_purchase_price," &_ " Supplier_Detail.Supplier_Name, invoice.invoice_date,Invoice.Invoice_no, " &_ " Customer_User.User_Name,Customer_User.User_code,Cost_Centre.Cost_Centre_Code,Cost_Centre.Cost_Centre_Description, " &_ " Department.Department_Code, Department.Department_Desc " &_ " FROM Asset_Detail left JOIN user_data on userdataassetid = asset_detail.asset_id " &_ " inner join Contract_detail ON Asset_Detail.Asset_contract_no = Contract_detail.Contract_no " &_ " left JOIN Department ON Asset_Detail.Asset_Department_Id = Department.Department_Id " &_ " left JOIN Customer_User ON Customer_User.User_Id = Asset_Detail.Asset_User_Id " &_ " left JOIN ( select * from Cost_Centre where Cost_Centre_Active <> 0) Cost_Centre ON " &_ " Cost_Centre.Cost_Centre_ID = Asset_Detail.Asset_CostCentre_Id " &_ " LEFT JOIN Invoice ON Asset_Detail.Asset_invoice_id = Invoice.Invoice_id " &_ " left JOIN state ON asset_detail.asset_TO_stateID=state.stateid " &_ " LEFT JOIN Asset_Type ON Asset_Detail.Asset_type_id = Asset_Type.Asset_type_id " &_ " LEFT JOIN AssetTypesub on Asset_detail.asset_subtype=assettypesub.assetTypesubId " &_ " LEFT JOIN Asset_Category ON Asset_Category.Asset_category_id = Asset_Type.Asset_type_Category_id " &_ " LEFT JOIN Supplier_Detail ON Invoice.Invoice_supplier_id = Supplier_Detail.Supplier_id " &_ " WHERE Contract_detail.Contract_customer_id = " & Session(CUSTOMER_ID) & _ " AND ISNULL(Asset_Detail.Asset_Active,0) <> 0 AND Asset_Type.Asset_type_id IN(131,135,132,95,99,66,101,102,145,310)AND Client_Intent_Date IS NULL AND Client_comments IS NULL "
Comment