dbTalk Databases Forums  

Progress code into SQL

comp.databases.progress comp.databases.progress


Discuss Progress code into SQL in the comp.databases.progress forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Elliot J
 
Posts: n/a

Default Progress code into SQL - 06-20-2005 , 03:02 AM






Hello all,

I am attempting to do something in SQL, which I would imagine is quite
straight forward, however my SQL knowledge is abysmal.

I am basically just trying to create a record in table2, for every
record in table1, using values from table1.

In beloved Progress, I would have gone about it like this:

FOR EACH table1 NO-LOCK:

CREATE table2.
ASSIGN table2.field1 = table1.field3
table2.field2 = table1.field1
table2.field3 = table1.field9.

END.

I haven't used Progress for years now, but I think that would pretty
much be it.

Would anyone be kind enough to translate the above to basic SQL please?

Thank you very much.

Elliot J


Reply With Quote
  #2  
Old   
Dan
 
Posts: n/a

Default Re: Progress code into SQL - 06-20-2005 , 09:56 AM






On 6/20/2005 3:02 AM, Elliot J wrote:
Quote:
Hello all,

I am attempting to do something in SQL, which I would imagine is quite
straight forward, however my SQL knowledge is abysmal.

I am basically just trying to create a record in table2, for every
record in table1, using values from table1.

In beloved Progress, I would have gone about it like this:

FOR EACH table1 NO-LOCK:

CREATE table2.
ASSIGN table2.field1 = table1.field3
table2.field2 = table1.field1
table2.field3 = table1.field9.

END.

I haven't used Progress for years now, but I think that would pretty
much be it.

Would anyone be kind enough to translate the above to basic SQL please?

Thank you very much.

Elliot J

INSERT INTO DestTable ( field1, field2 )
SELECT SourceTable.field1, SourceTable.field2
FROM SourceTable;


Reply With Quote
Reply




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.