我知道这个但是得到错误可以提供解决方案。
marker.setTitle('hii')
答案 0 :(得分:1)
你没有创建表,它应该看起来像这样
DECLARE @TableName VARCHAR(500);
SET @TableName = N'businessmaster_'+CONVERT(VARCHAR(10),GetDate()-1,112);
EXEC (N'CREATE TABLE '+@TableName +' ( contentid int,Businessname varchar(50) )')
print @TableName
declare @sql varchar(100)
SET @sql = 'INSERT INTO '+ @TableName+' (contentid,Businessname) SELECT top 10 contentid,Businessname FROM businessmaster';
EXEC (@sql)
答案 1 :(得分:1)
您没有创建表,如何向表中插入数据不存在:
DECLARE @TableName VARCHAR(MAX);
DECLARE @SQL NVARCHAR(MAX);
SET @TableName = N'businessmaster_'+
CONVERT(VARCHAR(10),GetDate()-1,112);
SET @SQL = N' CREATE TABLE '+@TableName + N' ( contentid int,Businessname varchar(50) )';
EXECUTE (@SQL);
SET @SQL = 'INSERT INTO '+ @TableName+' (contentid,Businessname) SELECT top 10 contentid,Businessname FROM businessmaster';
EXECUTE (@SQL);
<强> Demo 强>