Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 sql

Author  Topic 

angela_g
Starting Member

17 Posts

Posted - 2013-09-18 : 09:41:17
Hi Can somebody help me with this SQL please?

UPDATE RE_EZPAY_AT_AGENCY_DAILY
SET RE_EZPAY_AT_AGENCY_DAILY.STATUS ='H'
SELECT RE_EZPAY_AT_AGENCY_DAILY.STATUS, RE_EZPAY_AT_AGENCY_DAILY.DEBT
FROM RE_EZPAY_AT_AGENCY_DAILY;
WHERE RE_EZPAY_AT_AGENCY_DAILY.DEBT >250
AND RE_EZPAY_AT_AGENCY_DAILY.STATUS ='O';

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2013-09-18 : 10:25:57
what is the question here ?


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

angela_g
Starting Member

17 Posts

Posted - 2013-09-18 : 10:33:35
This isn't giving me any results i'm getting the floowing error message
Error starting at line 7 in command:
AND RE_EZPAY_AT_AGENCY_DAILY.STATUS ='O'
Error report:
Unknown Command
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2013-09-18 : 10:41:20
Remove the semicolon on the FROM line

UPDATE RE_EZPAY_AT_AGENCY_DAILY
SET RE_EZPAY_AT_AGENCY_DAILY.STATUS ='H'
SELECT RE_EZPAY_AT_AGENCY_DAILY.STATUS, RE_EZPAY_AT_AGENCY_DAILY.DEBT
FROM RE_EZPAY_AT_AGENCY_DAILY;
WHERE RE_EZPAY_AT_AGENCY_DAILY.DEBT >250
AND RE_EZPAY_AT_AGENCY_DAILY.STATUS ='O';


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2013-09-18 : 10:43:26
As answered in the other topic you have started, PLEASE REMOVE THE ; IN THE LINE STARTING WITH "FROM".



Microsoft SQL Server MVP, MCT, MCSE, MCSA, MCP, MCITP, MCTS, MCDBA
Go to Top of Page

angela_g
Starting Member

17 Posts

Posted - 2013-09-18 : 11:29:45
Thankyou SwePeso and KH! :)
Go to Top of Page

angela_g
Starting Member

17 Posts

Posted - 2013-09-18 : 11:43:44
I'm trying to use this as a dynamic action in APEX but i am now getting this error message

•ORA-06550: line 5, column 1: PLS-00428: an INTO clause is expected in this SELECT statement
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2013-09-19 : 00:33:33
You are not using SQL Server. For Oracle questions, please post in dbforums.com


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

angela_g
Starting Member

17 Posts

Posted - 2013-09-19 : 04:31:45
I' m receiving the error when i enter this SQL, i thought I may have to use something different if entering it in to a dynamic action......
UPDATE RE_EZPAY_AT_AGENCY_DAILY
SET RE_EZPAY_AT_AGENCY_DAILY.STATUS ='H';
SELECT RE_EZPAY_AT_AGENCY_DAILY.STATUS, RE_EZPAY_AT_AGENCY_DAILY.DEBT
FROM RE_EZPAY_AT_AGENCY_DAILY
WHERE RE_EZPAY_AT_AGENCY_DAILY.DEBT >250
AND RE_EZPAY_AT_AGENCY_DAILY.STATUS ='O';
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2013-09-19 : 10:03:09
Which part should be "dynamic"?
And you have realized by now that this is a Microsoft SQL Server dedicated site?



Microsoft SQL Server MVP, MCT, MCSE, MCSA, MCP, MCITP, MCTS, MCDBA
Go to Top of Page
   

- Advertisement -