question

Equus avatar image
Equus asked

Why Is SQL telling me that NVARCHAR is not a recognized built in function name on SSMS V17 SQL SERVER 2012

Right clicked on an existing table to use the built in function Script Table as Insert into. When the script was generated I received a lot of errors saying that NVARCHAR in not a recognized built in function name. SSMS generated the script so I am very confused. I have several tables the use the NVARCHAR data type.

sql-server-2012ssms
4 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

It would help if you could share the schema of the table and the script that SSMS generated.

Also, you say you're on SSMS 2012 - is there any particular reason you're not using the latest (or nearly the latest) version? It may be that this is a bug that has been fixed in a more recent version.

0 Likes 0 ·
Equus avatar image Equus ThomasRushton ♦♦ ·

The government controls what version I use of anything. My mistake, it's SQL Server 2012 and SSMS V17. As far as the script, here what I get, note - it's raw and not cleaned up:

GO

INSERT INTO [dbo].[TblSampleItem]
([smi_dw_rev]
,[smi_ct_counter]
,[smi_man_code]
,[smi_job_order]
,[smi_rcv_date]
,[smi_trans_date])
VALUES
(<sm_dw_rev, nvarchar(5),>
,<sm_ct_counter, int,>
,<sm_man_code, int,>
,<sm_job_order, nvarchar(17),>
,<sm_rcv_date, datetime,>
,<sm_trans_date, datetime,>)

GO

0 Likes 0 ·

And is that the code you're trying to run?

If so, that won't work. Those <sm_xx_yyy, somedatatype> bits are placeholders, telling you what fields and types need to go there. Replace those with some values, and it should be fine.

0 Likes 0 ·
Show more comments

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.