SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 sql
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

angela_g
Starting Member

United Kingdom
17 Posts

Posted - 09/18/2013 :  09:41:17  Show Profile  Reply with Quote
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)

Singapore
17638 Posts

Posted - 09/18/2013 :  10:25:57  Show Profile  Reply with Quote
what is the question here ?


KH
Time is always against us

Go to Top of Page

angela_g
Starting Member

United Kingdom
17 Posts

Posted - 09/18/2013 :  10:33:35  Show Profile  Reply with Quote
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)

Singapore
17638 Posts

Posted - 09/18/2013 :  10:41:20  Show Profile  Reply with Quote
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
Time is always against us


Edited by - khtan on 09/18/2013 10:42:25
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

Sweden
30249 Posts

Posted - 09/18/2013 :  10:43:26  Show Profile  Visit SwePeso's Homepage  Reply with Quote
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

United Kingdom
17 Posts

Posted - 09/18/2013 :  11:29:45  Show Profile  Reply with Quote
Thankyou SwePeso and KH! :)
Go to Top of Page

angela_g
Starting Member

United Kingdom
17 Posts

Posted - 09/18/2013 :  11:43:44  Show Profile  Reply with Quote
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)

Singapore
17638 Posts

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


KH
Time is always against us

Go to Top of Page

angela_g
Starting Member

United Kingdom
17 Posts

Posted - 09/19/2013 :  04:31:45  Show Profile  Reply with Quote
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

Sweden
30249 Posts

Posted - 09/19/2013 :  10:03:09  Show Profile  Visit SwePeso's Homepage  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.27 seconds. Powered By: Snitz Forums 2000