Link to home
Start Free TrialLog in
Avatar of AZZA-KHAMEES
AZZA-KHAMEESFlag for Bahrain

asked on

create a new table from view

Hi Experts
i am trying to copy the content of the view to a new table

i am using this query

CREATE TABLE temp_Courses
  AS (SELECT distinct(Description) FROM [Training].[dbo].[masCourse]);

Open in new window


and i am getting this error
Msg 156, Level 15, State 1, Line 2
Incorrect syntax near the keyword 'AS'.

i even tried this
  SELECT Description
INTO temp_courses
FROM (SELECT distinct Description FROM [Training].[dbo].[masCourse])

Open in new window


also not working i am getting this error
Msg 102, Level 15, State 1, Line 3
Incorrect syntax near ')'.

Open in new window


can you help me please
SOLUTION
Avatar of Dale Burrell
Dale Burrell
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Avatar of Sharath S
Sharath S
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AZZA-KHAMEES

ASKER

thanks