Hi,
Is it possible to include a Named Parameter in a Select clause?
I am trying to create an DML style Insert. I am selecting the information from a table. The table has all the information except one value that is supplied as a parameter. When I try to include the parameters in the select I get an error stating that it does not recognize the parameters. An example is below. (This is an example to show what I am referring to. )
INSERT INTO eventScheduler (customerId, eventStart, eventEnd, eventDate, eventLocation, requestId) SELECT cus.customerId, ev.AvailableStart, ev.AvailabilityEnd, sysDate, :requestId FROM event ev, customer cus WHERE cus.customerId = ev.customerId
So far the only way to accomplish this is the following: INSERT INTO eventScheduler (customerId, eventStart, eventEnd, eventDate, eventLocation, requestId) SELECT cus.customerId, ev.AvailableStart, ev.AvailabilityEnd, sysDate, :requestId FROM event ev, customer cus, request req where cus.customerId = ev.customerId AND req.id = :requestId
|