I have is query. That I'm getting an error message "Msg 156, Level 15, State 1, Line 23
Incorrect syntax near the keyword 'FROM'." It is pointing to the query "FROM [TOMSQLVISION].[VISION_2020].[REAL_PROP].[VW_HSALE]." This query pulls in data from 1 sql server and creates a table in another sql server. Then populates a web page.
1 DROP TABLE [dbo].[VISION_SALEHIST4]
2 SELECT
3
4 MNC,
5 PID,
6 LINE_NUM,
7 BOOK_PG,
8 CONVERT(datetime, SALEDATE) AS SALEDATE,
9 SALEPRICE,
10 CERTIFICATE,
11 INSTRUMENT,
12 QUALIFIED,
13 OWN_NAME,
14 CO_OWN_NAME,
15 ADDRESS1,
16 ADDRESS2,
17 CITY,
18 STATE,
19 ZIP
20
21 INSERT INTO [dbo].[VISION_SALEHIST4]
22
23 FROM [TOMSQLVISION].[VISION_2020].[REAL_PROP].[VW_HSALE]
What I have tried:
I'm connected to the other server tomsqlvision. The table that query is pullilng the data from is a view table. Would that make a difference?
Thanks for the help.