Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 3rd, 2012  |  syntax: None  |  size: 0.61 KB  |  hits: 15  |  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     RSITEM.ItemCode AS [Box Barcode], bgengttspecialreport.Itemcode AS [File Folder Code], SUBSTRING(MAX(bgengttspecialreport.Rsitemdescription),
  2.                       CHARINDEX('DOCUMENT', MAX(bgengttspecialreport.Rsitemdescription COLLATE Latin1_General_CS_AS)), CHARINDEX(',PROJECT',
  3.                       MAX(bgengttspecialreport.Rsitemdescription COLLATE Latin1_General_CS_AS))) AS [Document Title], bgengttspecialreport.ItemStatusID
  4. FROM   bgengttspecialreport
  5. Inner Join
  6. (Select
  7. ItemCode as [Box Barcode]
  8. From RSITEM
  9. Group by Itemcode)
  10. RSITEM ON bgengttspecialreport.ContainerItemID = RSITEM.ItemID