473,406 Members | 2,217 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Can you make a new table from query results in tsql?

2
I'm using MS SQL Server Visual Studio 2008.

Thanks.
Oct 4 '09 #1
2 2048
ck9663
2,878 Expert 2GB
Try the keyword INTO.

Good luck...

--- CK
Oct 7 '09 #2
nbiswas
149 100+
Hi,
Your question is not very clear.. Are you looking for a in-memory table?

In that case you can go ahead with

a) Common table expression(Sql Server 2005+) e.g.(with cte as (//code))

b) Table variables e.g.(declare @tbl Table(col1 int,col2 nvarchar(max))

c) Temporary table(#temp or ##temp)

d)Table Valued Parameter(Sql server 2008+)


etc.

Else, issue the create table command followed by insert into tablename values(value1,value2...value n) or insert into..select command

Hope this helps
Nov 9 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Stephen Miller | last post by:
Is it possible to ALTER a temporary table in TSQL (SQL2000)? The following TSQL reports a syntax error at the ALTER TABLE line: DECLARE @Test TABLE( NOT NULL , NOT NULL ) ALTER TABLE...
11
by: randi_clausen | last post by:
Using SQL against a DB2 table the 'with' key word is used to dynamically create a temporary table with an SQL statement that is retained for the duration of that SQL statement. What is the...
3
by: Bill | last post by:
I'm trying to devise a query for use on SQL Server 2000 that will do what was previously done with one query in MS Access. The MS Access query was like this: SELECT Count(*) as , Abs(Sum( Like...
7
by: rednexgfx_k | last post by:
All, Problem Summary: I've running about 30 make table queries via VBA in Access 2000, and my database goes from 14,000k to over 2,000,000k. In addition, the longer the procedure runs, the...
4
by: roman.ali | last post by:
Hi, I am using a .dqy file to import some rows from a sql server 2003 database to microsoft excel. Unfortunately, I have am importing more rows than excel can handle. Is there a way around...
14
by: John T Ingato | last post by:
I have a contacts table with name address and such but are missing all phone numbers in the phone number fields. I have just received an updated customer list in Excel and have imported into a new...
3
by: Zammy | last post by:
Is there a way to specify different field names in a temporary table created using VBA? I just inherited a program and now the users want to export results to Excel. The original programmer only...
8
by: Bill Gower | last post by:
I want to store an SQL string into a table and then be able to run it later. Here is the insert command "insert into ProjectSQL(ProjectID, SQLID, SQLString) values( " & locProjectID & ", " &...
11
by: sphinney | last post by:
At the risk of oversimplifying my situation, here are the basic facts: * I'm writing an ACCESS 2002 VBA. * My VBA automatically uses information in one table (Table A) to repeatedly query a...
9
by: bubbles | last post by:
Newbie transiting from VBA to TSQL, using SQL Server 2005 Enterprise: Need help to do this: Open Table_A WITH TableA DO UNTIL .EOF Read value from TableA.ColumnA Run SQL Statement on...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.