我在做什么错在这里?'@starttimestamp'附近语法不正确。期待SELECT或(
Declare @starttimestamp datetime = getdate();
RAISERROR(N'Code not valid until %s', 16, 1, CAST(@starttimestamp AS VARCHAR));
产生一个错误说Incorrect syntax near 'CAST'.
和Incorrect syntax near '@starttimestamp'. Expecting SELECT or (
[请参阅我编辑的答案您的原始问题](http:// stackoverflo w.com/questions/10032914/concatenate-message-in-raiserror/10032939#10032939)。 – 2012-04-05 17:49:32