Solved

SQL Server Express create table

Posted on 2014-03-25
3
309 Views
Last Modified: 2014-03-25
Hello Expert,

Needed a database to do some joins on lists of servers.
Downloaded MS SQL Server Express 2012.

Got my join statement to work.

Thought I could just put 'Create table' in front of it to turn the
query into a table but I get

Msg 156, Level 15, State 1, Line 3
Incorrect syntax near the keyword 'select'.

So I pulled out the word 'select'
and I get

Msg 102, Level 15, State 1, Line 4
Incorrect syntax near 'Change_short$'.

I could have sworn I have done this before.
but it looks like they have changed the syntax.
Like whats up with all the dollar signs?
And how do i create tables and views?

Thanks.

Allen in Dallas
 



+++++++++++++++++++join statement begin+++++++++++++++++++++
select

     Change_short$.Name, Change_short$.[IP Address], ['Srvrs Rtrs Swtches$'].Name AS Expr1, ['Srvrs Rtrs Swtches$'].IP_Address,
                         ['Srvrs Rtrs Swtches$'].Device_type
FROM            Change_short$ right JOIN
                         ['Srvrs Rtrs Swtches$'] ON Change_short$.[IP Address] = ['Srvrs Rtrs Swtches$'].IP_Address

+++++++++++++++++++join statement end+++++++++++++++++++++
0
Comment
Question by:9apit
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 3

Expert Comment

by:englanddg
ID: 39954163
Create Table <table name> as (<select statement>) should work...
0
 
LVL 11

Accepted Solution

by:
John_Vidmar earned 500 total points
ID: 39954352
Before the from-clause, use an into-clause:
select ...
into <table name>
from ...
where ...
...

Open in new window

0
 

Author Closing Comment

by:9apit
ID: 39954484
this worked
select
     Change_short$.Name, Change_short$.[IP Address], ['Srvrs Rtrs Swtches$'].Name AS Expr1, ['Srvrs Rtrs Swtches$'].IP_Address,
                         ['Srvrs Rtrs Swtches$'].Device_type
into server2
FROM            Change_short$ right JOIN
                         ['Srvrs Rtrs Swtches$'] ON Change_short$.[IP Address] = ['Srvrs Rtrs Swtches$'].IP_Address

Thanks
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
monitoring configuration for SQL server DB 32 48
Star schema daily updates 2 37
SQL 2014 missing dll from Bin? 3 33
SQL syntax question 6 42
Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question