2010-04-30 81 views

回答

0

這個工程來選擇數據,但沒有什麼隔離I W螞蟻:

SELECT  Citation 
FROM   Citations 
WHERE  (Citation LIKE '%\,%' ESCAPE '\') 
ORDER BY Citation 

啊,這個工程:

SELECT Citation, 
      SUBSTRING(Citation, 
       CHARINDEX(',', Citation) + 1, 
       LEN(Citation) - CHARINDEX(',', Citation)) AS Truncated 
    FROM   Citations 
    WHERE  (Citation LIKE '%\,%' ESCAPE '\') 
    ORDER BY Truncated 

感謝CK!

0

嘗試這樣:

SELECT  Citation 
      , SUBSTRING(Citation, CHARINDEX(',', Citation) + 1, 
         LEN(Citation) - CHARINDEX(',', Citation)) 
FROM   Citations 
WHERE  (Citation LIKE '%\,%' ESCAPE '\') 
ORDER BY Citation 
+0

語法不報錯了,但兩列是相同的。 – Fred 2010-04-30 07:46:39

相關問題