Solved

select into

Posted on 2011-03-21
3
226 Views
Last Modified: 2012-08-13
what would be the syntax to select from the same table and insert
the same id lets say id  377, but all storenumbers with the same id 377 within this one table.


select storenumbers from users1
insert into users1 (storenumbers , '377')
0
Comment
Question by:sevensnake77
[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 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 35180799
this should do:

insert into users1 (storenumbers , id) 
select storenumbers , '377' 
from users1 

Open in new window

0
 
LVL 50

Expert Comment

by:Lowfatspread
ID: 35180975
insert into users1 (id,storenumbers)
select distinct 377,storenumbers
from users1
0
 
LVL 9

Author Closing Comment

by:sevensnake77
ID: 35180984
tks
0

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

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

In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
I have a large data set and a SSIS package. How can I load this file in multi threading?
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…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

710 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