471,092 Members | 1,542 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,092 software developers and data experts.

append a table onto the end of another

I have two tables, appointments and backupappointments.
I also have a
function getAppointments(theDate DATE) RETURN RECORDSET
(which has not been written yet).
What I want the function to do is take a date, and return a table of
appointments on that date. My problem has two parts:

1) How do I append the table backupappointments to the table
appointments so that I can do a simple SELECT on the date of this new
table?

2) How do I return the filtered table?

Any help would be greatly appriciated

Jagdip Singh Ajimal
Jul 19 '05 #1
3 8117

"Jagdip Singh Ajimal" <js*****@hotmail.com> wrote in message
news:c8**************************@posting.google.c om...
| I have two tables, appointments and backupappointments.
| I also have a
| function getAppointments(theDate DATE) RETURN RECORDSET
| (which has not been written yet).
| What I want the function to do is take a date, and return a table of
| appointments on that date. My problem has two parts:
|
| 1) How do I append the table backupappointments to the table
| appointments so that I can do a simple SELECT on the date of this new
| table?
|
| 2) How do I return the filtered table?
|
| Any help would be greatly appriciated
|
| Jagdip Singh Ajimal
lookup UNION (SQL) and REF CURSOR or pipeline functions or TABLE(CAST
(see my posts on 'example: PIPELINED function' and 'Input array string')

-- mcs

Jul 19 '05 #2
js*****@hotmail.com (Jagdip Singh Ajimal) wrote in message news:<c8**************************@posting.google. com>...
I have two tables, appointments and backupappointments.
I also have a
function getAppointments(theDate DATE) RETURN RECORDSET
(which has not been written yet).
What I want the function to do is take a date, and return a table of
appointments on that date. My problem has two parts:

1) How do I append the table backupappointments to the table
appointments so that I can do a simple SELECT on the date of this new
table?

2) How do I return the filtered table?

Any help would be greatly appriciated

Jagdip Singh Ajimal


If you can write a select to get the records from each table then you
can add a UNION to combine the two selects into one SQL statement,
perhaps a view. You could then query the view/UNION statement to get
your result set.

You have many options on how you return the record set depending on
what you want to do with it.

See the Concepts manual for an explantion of Views and the SQL manual
for CREATE VIEW and UNION.

HTH -- Mark D Powell --
Jul 19 '05 #3
js*****@hotmail.com (Jagdip Singh Ajimal) wrote in message news:<c8**************************@posting.google. com>...
I have two tables, appointments and backupappointments.
I also have a
function getAppointments(theDate DATE) RETURN RECORDSET
(which has not been written yet).
What I want the function to do is take a date, and return a table of
appointments on that date. My problem has two parts:

1) How do I append the table backupappointments to the table
appointments so that I can do a simple SELECT on the date of this new
table?

2) How do I return the filtered table?

Any help would be greatly appriciated

Jagdip Singh Ajimal

1) Create a view usin the UNION of both tables
2) return a "REF CURSOR"

details left as an exercise for the reader.
Jul 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Danny | last post: by
1 post views Thread by David Barger | last post: by
2 posts views Thread by RichardP via AccessMonster.com | last post: by
3 posts views Thread by Jagdip Singh Ajimal | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.