Solved

select into

Posted on 2011-03-21
3
228 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:Seven price
[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:Seven price
ID: 35180984
tks
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

624 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