Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread SELECT entire row
Mon, May 7 2007 4:35 PMPermanent Link

Andy
I am trying to move one row from one table to another table.  Is there an easy way to do this?  I have 65 fields to move and they will be changing each time.  Basically I
am taking customers out of the searchable table and moving them to a temp table until they pay their bill so my salespeople can't sell to them.  Once they pay their bill I
will move them back into the real table.  Can I tell it to insert an entire row to another table with all field data in it?
Mon, May 7 2007 5:23 PMPermanent Link

"Donat Hebert \(Worldsoft\)"
A straight insertion would look like:

Insert into TargetTable
Select * from SourceTable
Where UniqueField = UniqueValue;  (ExecSQL)

Assuming same file structure.  That's it.  Donat.


"Andy" <sales@a1telecom.com> wrote in message
news:A3A0C3AE-B540-4811-885E-18CB400E1DB2@news.elevatesoft.com...
>I am trying to move one row from one table to another table.  Is there an
>easy way to do this?  I have 65 fields to move and they will be changing
>each time.  Basically I
> am taking customers out of the searchable table and moving them to a temp
> table until they pay their bill so my salespeople can't sell to them.
> Once they pay their bill I
> will move them back into the real table.  Can I tell it to insert an
> entire row to another table with all field data in it?
>

Tue, May 8 2007 8:32 AMPermanent Link

"Robert"

"Andy" <sales@a1telecom.com> wrote in message
news:A3A0C3AE-B540-4811-885E-18CB400E1DB2@news.elevatesoft.com...
>I am trying to move one row from one table to another table.  Is there an
>easy way to do this?  I have 65 fields to move and they will be changing
>each time.  Basically I
> am taking customers out of the searchable table and moving them to a temp
> table until they pay their bill so my salespeople can't sell to them.
> Once they pay their bill I
> will move them back into the real table.  Can I tell it to insert an
> entire row to another table with all field data in it?
>

While Donat's solution (coupled with a delete from the first table) would do
the trick, a much better solution IMO would be to add a "display" boolean
field, default true, and set it to false on these cases. Then have a filter
in the query DISPLAY=TRUE. That way, you don't need to move the data to a
separate table, by flipping the filtered attribute you get either all
customers or just "displayable" customers.

Robert

Tue, May 8 2007 10:06 AMPermanent Link

Andy
Thanks guys...I thought there might be a simple way to move an entire row of
data instead writing it out column by column...
Image