![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have need to do something like this: if tablename = 'FOO' insert into foo ... else if tablename = 'BAR' insert into bar ... (exact same stuff) etc... I hesitate to use an execute immediate, due to the troublesome quoting issues, but is there a good way to do something like this? insert into $TABLENAME ... Many TIA! Mark -- Mark Harrison Pixar Animation Studios |
#3
| |||
| |||
|
|
I have need to do something like this: if tablename = 'FOO' insert into foo ... else if tablename = 'BAR' insert into bar ... (exact same stuff) etc... I hesitate to use an execute immediate, due to the troublesome quoting issues, but is there a good way to do something like this? insert into $TABLENAME ... Many TIA! Mark -- Mark Harrison Pixar Animation Studios |
#4
| |||
| |||
|
|
I have need to do something like this: if tablename = 'FOO' insert into foo ... else if tablename = 'BAR' insert into bar ... (exact same stuff) etc... I hesitate to use an execute immediate, due to the troublesome quoting issues, but is there a good way to do something like this? insert into $TABLENAME ... Many TIA! Mark -- Mark Harrison Pixar Animation Studios |
#5
| |||
| |||
|
|
I have need to do something like this: if tablename = 'FOO' insert into foo ... else if tablename = 'BAR' insert into bar ... (exact same stuff) etc... I hesitate to use an execute immediate, due to the troublesome quoting issues, but is there a good way to do something like this? insert into $TABLENAME ... Many TIA! Mark -- Mark Harrison Pixar Animation Studios |
#6
| |||
| |||
|
|
mh (AT) pixar (DOT) com> wrote in message if tablename = 'FOO' insert into foo ... else if tablename = 'BAR' insert into bar ... (exact same stuff) etc... Use bind variables.) |
|
You have an odd schema is each table has the same structure but a different name. |
#7
| |||
| |||
|
|
mh (AT) pixar (DOT) com> wrote in message if tablename = 'FOO' insert into foo ... else if tablename = 'BAR' insert into bar ... (exact same stuff) etc... Use bind variables.) |
|
You have an odd schema is each table has the same structure but a different name. |
#8
| |||
| |||
|
|
mh (AT) pixar (DOT) com> wrote in message if tablename = 'FOO' insert into foo ... else if tablename = 'BAR' insert into bar ... (exact same stuff) etc... Use bind variables.) |
|
You have an odd schema is each table has the same structure but a different name. |
#9
| |||
| |||
|
|
mh (AT) pixar (DOT) com> wrote in message if tablename = 'FOO' insert into foo ... else if tablename = 'BAR' insert into bar ... (exact same stuff) etc... Use bind variables.) |
|
You have an odd schema is each table has the same structure but a different name. |
#10
| |||
| |||
|
|
gym dot scuba dot kennedy at gmail <kennedyii (AT) verizon (DOT) net> wrote: mh (AT) pixar (DOT) com> wrote in message if tablename = 'FOO' insert into foo ... else if tablename = 'BAR' insert into bar ... (exact same stuff) etc... Use bind variables.) I guess that's what I'm asking... how can I use bind variables or equivalent for the table name? |
|
You have an odd schema is each table has the same structure but a different name. There's a reason for it, we basically don't want to intermingle one set of data with another. Think of the case where there's a million records of FOO and 100 records of BAR. An index won't be very useful, so you end up doing a lot of full table scans to extract the data, and we don't want to pay the big cost of FOO for the tiny data from BAR. The real case is a bit more complicated, but that's what it boils down to. |
![]() |
| Thread Tools | |
| Display Modes | |
| |