Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Nov 20th, 2012  |  syntax: None  |  size: 3.41 KB  |  views: 32  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. SELECT TOP 10 [AssetMaintenanceRecord].[MtceRegID] AS [AssetMaintenanceRecord__0], [AssetMaintenanceRecord].[AssetID] AS [AssetMaintenanceRecord__1], CAST(CAST([AssetMaintenanceRecord].[MtceRegNote] AS VARCHAR(8000)) AS TEXT) AS [AssetMaintenanceRecord__2], [AssetMaintenanceRecord].[POno] AS [AssetMaintenanceRecord__3], CAST(CAST([AssetMaintenanceRecord].[NotifiedDate] AS VARCHAR(8000)) AS TEXT) AS [AssetMaintenanceRecord__4], CAST(CAST([AssetMaintenanceRecord].[CompletedDate] AS VARCHAR(8000)) AS TEXT) AS [AssetMaintenanceRecord__5], [AssetMaintenanceRecord].[MtceRegTitle] AS [AssetMaintenanceRecord__6], CAST(CAST([AssetMaintenanceRecord].[CreatedDate] AS VARCHAR(8000)) AS TEXT) AS [AssetMaintenanceRecord__7], [AssetMaintenanceRecord].[CreatedUserID] AS [AssetMaintenanceRecord__8], CAST(CAST([AssetMaintenanceRecord].[ModifiedDate] AS VARCHAR(8000)) AS TEXT) AS [AssetMaintenanceRecord__9], [AssetMaintenanceRecord].[ModifiedUserID] AS [AssetMaintenanceRecord__10], [Asset].[aID] AS [Asset__11], [Asset].[ptCode] AS [Asset__12], [Asset].[aNo] AS [Asset__13], [Asset].[aFullCode] AS [Asset__14], [Asset].[aDesc] AS [Asset__15], [Asset].[aMake] AS [Asset__16], [Asset].[aModel] AS [Asset__17], [Asset].[aSerialNo] AS [Asset__18], [Asset].[aRegNo] AS [Asset__19], CAST(CAST([Asset].[aRegExpDate] AS VARCHAR(8000)) AS TEXT) AS [Asset__20], [Asset].[aActive] AS [Asset__21], [Asset].[aIncAssetRpt] AS [Asset__22], [Asset].[aIncFinanceRpt] AS [Asset__23], [Asset].[aIsTrailer] AS [Asset__24], [Asset].[aIsSurveyEquip] AS [Asset__25], [Asset].[aCostedItem] AS [Asset__26], [Asset].[aCostedPeriod] AS [Asset__27], [Asset].[aWarrantyPeriod] AS [Asset__28], [Asset].[aPONo] AS [Asset__29], CAST(CAST([Asset].[aPODate] AS VARCHAR(8000)) AS TEXT) AS [Asset__30], CAST(CAST([Asset].[aPOCostExGst] AS VARCHAR(8000)) AS TEXT) AS [Asset__31], [Asset].[aQtyStock] AS [Asset__32], [Asset].[aQtyInUse] AS [Asset__33], [Asset].[aCurrProject] AS [Asset__34], [Asset].[aCurrOperator] AS [Asset__35], [Asset].[aStolen] AS [Asset__36], CAST(CAST([Asset].[aStolenDate] AS VARCHAR(8000)) AS TEXT) AS [Asset__37], [Asset].[aWO] AS [Asset__38], CAST(CAST([Asset].[aWODate] AS VARCHAR(8000)) AS TEXT) AS [Asset__39], [Asset].[aSold] AS [Asset__40], CAST(CAST([Asset].[aSoldDate] AS VARCHAR(8000)) AS TEXT) AS [Asset__41], CAST(CAST([Asset].[aSoldPrice] AS VARCHAR(8000)) AS TEXT) AS [Asset__42], CAST(CAST([Asset].[aNotes] AS VARCHAR(8000)) AS TEXT) AS [Asset__43], CAST(CAST([Asset].[LastModDate] AS VARCHAR(8000)) AS TEXT) AS [Asset__44], CAST(CAST([Asset].[CreatedDate] AS VARCHAR(8000)) AS TEXT) AS [Asset__45], [Asset].[aCat] AS [Asset__46], [Asset].[aPoliceRptNo] AS [Asset__47], [Asset].[aRelatedAssetID] AS [Asset__48], [Asset].[aRelatedAssetFullCode] AS [Asset__49], [Asset].[aPayMethod] AS [Asset__50], [Asset].[aInvoiceNo] AS [Asset__51], CAST(CAST([Asset].[aLastFuelDate] AS VARCHAR(8000)) AS TEXT) AS [Asset__52], [Asset].[aFuelType] AS [Asset__53] FROM [tbMtceRegister] AS [AssetMaintenanceRecord] LEFT JOIN [tbAsset] AS [Asset2] ON ([Asset2].[aID] = aID) LEFT JOIN [tbProject] AS [Project] ON ([Project].[pjID] = [Asset2].[aCurrProject]) LEFT JOIN [tbPersonnel] AS [ProjectManager] ON ([ProjectManager].[perID] = [Project].[pjProjectManager]) LEFT JOIN [tbAsset] AS [Asset] ON ([AssetMaintenanceRecord].[AssetID] = [Asset].[aID]) WHERE [CompletedDate] IS NULL AND (([ProjectManager].[PerGivenName] LIKE '%test%') OR ([ProjectManager].[PerSurname] LIKE '%test%')) ORDER BY [CompletedDate] ASC
clone this paste RAW Paste Data