Hi Experts,
I get an error on the syntax when i want to create a new table from a join. Here the query:
USE GeniqOrbis CREATE TABLE ZORGREG AS SELECT [PSY_PSHOE].[PSYIN_IDEN] ,[PSY_PSHOE].[TYD_VAN] ,[PSY_PSHOE].[DAT_VAN] ,[PSY_PSHOE].[DAT_TOT] ,[PSY_PSHOE].[PRIM] ,[PSY_PSHOE].[PSHOE_IDEN_V] ,[PSY_PSHOE].[MEDWK_IDEN_V] FROM [GeniqSA].[dbo].[PSY_PSHOE] LEFT JOIN PSY_PSYIN ON DBO.PSY_PSHOE.PSYIN_IDEN=dbo.PSY_PSYIN.PSYIN_IDEN
( the table should be created in the database GeniqOrbis but the data comes out of the database GeniqSA)
i get the message:
Msg 156, Level 15, State 1, Line 2
Incorrect syntax near the keyword 'AS'.