To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here

HOME News MS SQL Oracle DB2 Access MySQL PHP Scripts Books Links DBA Talk


Go Back   Database Journal Forums > Related Sites > SQL Course

SQL Course SQL Course > Ask questions about the lessons on SQL Course 1 and 2. If you have problems > with the interface, please post in the Feedback forum

Reply Post New Thread
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 02-05-2003, 10:40 AM
rubiconne rubiconne is offline
Junior Member
 
Join Date: Feb 2003
Posts: 4
Insert select with order by

I am trying to execute this:

insert into Table1 (Field1,Field2,Field3)
select sequence1.nextval,Field4,Field5
from Table2
where Field6='Something'
order by Field7

I want row from Table2 to be inserted in Table1 in a specific order.

It is not working. I have tried whitout the sequence but it doesn't work.

It is a query executed from a Visual Basic application, but i can't make a procedure right now, there isn't enough time to make it and change everything.

Thank you.
Reply With Quote
  #2  
Old 02-05-2003, 01:38 PM
skhanal skhanal is offline
Experts
 
Join Date: Nov 2002
Location: New Jersey, USA
Posts: 3,386
What's the error you get?

Can you do the same from SQL Plus?
__________________
http://gotodba.com
Reply With Quote
Reply Post New Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 08:16 AM.


DatabaseJournal Recent Articles


 » Grouping with SQL Server 2008

 » Conducting Service Broker Conversation Usi...

 » Applying data warehousing principles to ev...

 » Oracle New Year's resolutions, part 1: Adv...

 » Hands on: Understanding SQL queries

Search Database Journal:
 





Acceptable Use Policy

JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers

Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.