So my procedure should add a row to the table INSÄTTNING. Some keys are reference keys. When the row has been inserted it should take P_BELOPP and subtract it with SALDO which is in another table called KONTO. The new amount should be added into that column and replace the old amount. My code looks like this so far:
Then here's what I think: the SQL processor knows what "konto.saldo" means. It doesn't know what "saldo" by itself means. But you've said here that they mean the same thing to you. This suggests an obvious change to me; you should be able to see it.
And again, Oracle makes it perfectly clear in their error messages - NOT.
I believe that this is the offending statement:And the most probable reason for offence is that you're attempting to use a statement designed to work with a single argument value but one of the components of that argument is a multiple-row slice of a database table.
That is, "konto.saldo" isn't just one value, it is many.
Some people, when well-known sources tell them that fire will burn them, don't put their hands in the fire.
Some people, being skeptical, will put their hands in the fire, get burned, and learn not to put their hands in the fire.
And some people, believing that they know better than well-known sources, will claim it's a lie, put their hands in the fire, and continue to scream it's a lie even as their hands burn down to charred stumps.
Many numbers is no better than many strings. I think what you probably wanted to do was loop through the table and print multiple rows.
Some people, when well-known sources tell them that fire will burn them, don't put their hands in the fire.
Some people, being skeptical, will put their hands in the fire, get burned, and learn not to put their hands in the fire.
And some people, believing that they know better than well-known sources, will claim it's a lie, put their hands in the fire, and continue to scream it's a lie even as their hands burn down to charred stumps.
I’m tired of walking, and will rest for a minute and grow some wheels. This is the promise of this tiny ad:
SKIP - a book about connecting industrious people with elderly land owners