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

Untitled

By: a guest on Aug 3rd, 2012  |  syntax: None  |  size: 0.79 KB  |  hits: 18  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. 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.Userfield1,
  4.                       bgengttspecialreport.ItemStatusID
  5. FROM         bgengttspecialreport INNER JOIN
  6.                       RSITEM ON bgengttspecialreport.ContainerItemID = RSITEM.ItemID
  7. GROUP BY RSITEM.ItemCode, bgengttspecialreport.Itemcode, bgengttspecialreport.ItemStatusID, bgengttspecialreport.Userfield1
  8. ORDER BY [Box Barcode], [File Folder Code]