SQLM_M
asked on
Insert Into OpenRowSet Syntax
Hi,
I am trying to insert a row into a table through openrowset. I get syntax Line 5: Incorrect syntax near '+'.
I am trying to insert a row into a table through openrowset. I get syntax Line 5: Incorrect syntax near '+'.
DECLARE @MaxDate_cdr DateTime
SET @MaxDate_cdr = (select MAX(CreatedDate) from Month10.dbo.cdr(nolock))
INSERT INTO OPENROWSET('SQLNCLI','Server=192.168.150.147;Trusted_Connection=True;',
'master.dbo.configtable(Country,Type,LastUpdateTime)Values(''India'',''cdr'','+@MaxDate_cdr+')')
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
It works
ASKER
it works
Greg
Open in new window