-1

我已经SELECT在存储过程中修改了我的语句,以便它的“票证”列包含指向某些 javascript 操作的超链接,但它给了我错误提示Invalid Column Name Ticket

Set @SQL = 'Select ''<a href=' + CHAR(39) + 'javascript:editTicketByIDAction(' + CONVERT(VarChar(Max), Ticket) + ')' + CHAR(39) + '>' + CONVERT(VarChar(Max), Ticket) + '</a>'' Ticket,VendorTicket[Vendor Ticket],Comments From dbo.VendorTickets Where NotifyOn <= GetDate() And IsNull(NotifyOn,0)<>0 '
4

1 回答 1

1

这是应该的

DECLARE @SQL varchar(250)='Select ''<a href="javascript:editTicketByIDAction('' + CONVERT(VarChar(Max), Ticket) + '')">'' + CONVERT(VarChar(Max), Ticket) + ''</a>'', Ticket,[Vendor Ticket],Comments From dbo.VendorTickets Where NotifyOn <= GetDate() And IsNull(NotifyOn,0)<>0  '
于 2012-08-11T11:09:39.230 回答