-
Copy and Paste
Hi,
Trying to figure this one out but not having too much success. I am working
on a small project that schedules and tracts work orders. I can enter the
data, Date, Order Number and Job Description into the database, the problem
is some orders last more than one day. I would like to enter / repeat the
same data to create a new record but increment the date by one day.
Any help would be greatly appreciated.
Thank you,
Bob
ps: Tried posting this question earlier, but it didn't seem to post. Sorry
if it did later and this is a repeat.
-
Re: Copy and Paste
To insert a record into a table from another table you need something like
this:
INSERT INTO Table1 ([Date], OrderNumber, Description)
SELECT Table2.Date + 1, OrderNumber, Description
FROM Table2
You did mention how you're distinguishing between multi-day orders and single-day
orders so you'll probably have to include some kind of WHERE clause to only
get the multi-day items. Also, you can use "FROM Table1" rather than "FROM
Table2" if you want to insert records back into the table but then you definitely
need to choose you're WHERE clause carefully.
"Bob" <rgschumann@home.com> wrote:
>
>Hi,
>
>Trying to figure this one out but not having too much success. I am working
>on a small project that schedules and tracts work orders. I can enter the
>data, Date, Order Number and Job Description into the database, the problem
>is some orders last more than one day. I would like to enter / repeat the
>same data to create a new record but increment the date by one day.
>
>Any help would be greatly appreciated.
>
>Thank you,
>Bob
>
>ps: Tried posting this question earlier, but it didn't seem to post. Sorry
>if it did later and this is a repeat.
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|