patternMinor
Oracle UPDATE followed by SELECT in LinqPad
Viewed 0 times
updatefollowedlinqpadselectoracle
Problem
I'm trying to
This syntax should work just fine in SQL Server SQL:
But the driver LinqPad uses is returning
Using multiple
UPDATE values in an Oracle database table (of salary information) that has no row IDs or a primary key. I'm writing these statements in LinqPad.This syntax should work just fine in SQL Server SQL:
UPDATE schedule_amounts
SET ANNUAL_RATE = 44000
WHERE SCHEDULE_ID = 'LCSD'
and SCHEDULE_NO = 2014
and SCHEDULE_LEVEL = 100
and SCHEDULE_STEP = 17
SELECT * FROM schedule_amountsBut the driver LinqPad uses is returning
ORA-00933: SQL command not properly ended.Using multiple
WHERE conditions is the only way I can specify the exact row I need to update. I have Googled Oracle's UPDATE syntax but I just can't seem to find an easy-to-understand example of how to do what, to me, is rather simple in SQL Server.Solution
Thank you all for your comments. You deserve the credit for this answer. To summarize:
The Oracle driver for LinqPad that I'm using (dotConnect Direct Mode based on OCI 8) wants the statement to be formatted like this (yes, wihout any semicolons):
The Oracle driver for LinqPad that I'm using (dotConnect Direct Mode based on OCI 8) wants the statement to be formatted like this (yes, wihout any semicolons):
UPDATE schedule_amounts
SET ANNUAL_RATE = 44000
WHERE SCHEDULE_ID = 'LCSD'
and SCHEDULE_NO = 2014
and SCHEDULE_LEVEL = 100
and SCHEDULE_STEP = 17
GO
SELECT * FROM schedule_amountsCode Snippets
UPDATE schedule_amounts
SET ANNUAL_RATE = 44000
WHERE SCHEDULE_ID = 'LCSD'
and SCHEDULE_NO = 2014
and SCHEDULE_LEVEL = 100
and SCHEDULE_STEP = 17
GO
SELECT * FROM schedule_amountsContext
StackExchange Database Administrators Q#42203, answer score: 2
Revisions (0)
No revisions yet.