I am attempting to insert a SAS dataset into an existing table on a SQL Server. This is via a simple proc sql
statement.
proc sql;
insert into Repo.Test_Table
select * from Work.MetaTable;
quit;
One of the fields, [Method], is not inserting into the SQL table as expected. The [Method] field in the SAS table contains several brackets and other punctuation so I think this is causing a problem. For example, the Work.MetaTable looks like this:
Field_ID | Method |
---|---|
1 | ([Field_1]<=[Field_8]) |
2 | ([Field_4]=[Field_5]) |
When I run the proc sql
to insert this into SQL, it only inserts the first open bracket "(" and this is the case for every row. For example, those two rows look like this in the SQL table:
Field_ID | Method |
---|---|
1 | ( |
2 | ( |
The [Method] field in SQL is nvarchar(max).
Does anyone know what might be causing the issue here and how I can get around it?