Copy a row from Table A to position 0 in Table B

D

dave

I've tried various things for the last two hours, and I give up! What
I really need is ImportRowAt(), and it would solve my issue, but since
that doesn't exist:

I have two tables with identical schema. I run through TableB and if
I find a row that matches my criteria, I want to insert it as the
FIRST row of TableA, which already contains items.

If I could clone the row, it'd meet my needs. If I could InsertAt(0)
without the "row is already in another table error", it'd meet my
needs.

Any help would be appreciated... so far I've seen a TON of posts on
this very issue, but they never get resolved, so I'm not the first to
hit this, but those who solve it don't report back :)

....so, any of these three will work:

1) Create a true clone of the row from TableB that I am free to
InsertAt(0) into TableA
2) ImportRow into TableA, then swap it within TableB (from the end of
the table to the start)
3) Accomplish what ImportAt() would if such a method existed

Thanks,
Dave
 
L

Lloyd Sheen

I've tried various things for the last two hours, and I give up! What
I really need is ImportRowAt(), and it would solve my issue, but since
that doesn't exist:

I have two tables with identical schema. I run through TableB and if
I find a row that matches my criteria, I want to insert it as the
FIRST row of TableA, which already contains items.

If I could clone the row, it'd meet my needs. If I could InsertAt(0)
without the "row is already in another table error", it'd meet my
needs.

Any help would be appreciated... so far I've seen a TON of posts on
this very issue, but they never get resolved, so I'm not the first to
hit this, but those who solve it don't report back :)

...so, any of these three will work:

1) Create a true clone of the row from TableB that I am free to
InsertAt(0) into TableA
2) ImportRow into TableA, then swap it within TableB (from the end of
the table to the start)
3) Accomplish what ImportAt() would if such a method existed

Thanks,
Dave

When you say table do you mean database table.

If you do then there is no such thing as position in the table. A database
table is just a set of rows. You can sort them using something like order
by but the order is only on the select, not on the table.

LS
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top