Programming

Programming questions? Ask a programmer for answers ASAP

Ask a Computer Expert,
Get an Answer ASAP!

Hello, Ive a series of programs written in Oracle Sql and…

Customer Question
Hello, I've a series of programs...
Hello,

I've a series of programs written in Oracle Sql and these series of programs should run only if the source table is populated. This source table is populated with dates - if this table is empty the rest of the programs should not run and exit the application.

Any sql to support this query would be greatly appreciated.

Thanks & regards
Submitted: 8 years ago.Category: Programming
Show More
Show Less
Ask Your Own Programming Question
Answered in 23 hours by:
6/16/2010
Programmer: Jim Clark, Software Developer replied 8 years ago
Jim Clark
Jim Clark, Software Developer
Category: Programming
Satisfied Customers: 422
Experience: 25 years of programming experience. 15 years in web development.
Verified
Hi!

I see no one has responded to your questions. I'm not an expert on Oracle SQL, and I don't have an installation to test this on. I work mostly with MS SQL Server and MySQL. Still, I might be able to get you moving in the right direction. Consider this approach:

declare cnt number;

begin
select count(*) into cnt from all_tables
where table_name = 'test.table1';

if cnt = 1 then
exit
end if;

Adjust your query according to your specific needs. I'm not positive about using EXIT or QUIT. You might send a return value back if you need to.

I hope that helps. I'll be happy to assist you further, or opt-out of the question entirely if you feel you might be better served by another expert. I responded because it looked like no one else had. Please don't press Accept unless you are satisfied. You are not compelled in any way to credit me unless you are completely satisifed. Wish I could help more.

James



Ask Your Own Programming Question
Customer reply replied 8 years ago

Thanks James,

But logic is not working ....

Programmer: Jim Clark, Software Developer replied 8 years ago
Ok.

For me to go futher, I'll need a more complete description of that you're programming and how you are working with it, so I can understand what is not working.

Thanks.

James
Ask Your Own Programming Question
Customer reply replied 8 years ago

Pl. try the following code and let me know how it goes:

 

CREATE TABLE _DATES AS

SELECT distinct A.*, B.REQUIRED_COPY

FROM MSGS_TBL A,

MSGS_TBL B,

WHERE A.REQUEST_ID = B.REQUEST_ID AND

A.MSG_ID = B.MSG_ID AND

B.END_DT = '31DEC9999';

 

select count(*) from cmurgent_dates;

declare cnt number;

begin

select count(*) into cnt from cmurgent_dates;

if cnt = 1 then

exit

end if;

 

If the _dates table is empty the rest of the other code should not run.

Customer reply replied 8 years ago

BELOW IS THE ERROR:

 

ERROR at line 5:
ORA-06550: line 5, column 7:
PLS-00103: Encountered the symbol "end-of-file" when expecting one of the
following:
begin case declare end exception exit for goto if loop mod
null pragma raise return select update while with
<an identifier> <a double-quoted delimited-identifier>
<a bind variable> << close current delete fetch lock insert
open rollback savepoint set sql execute commit forall merge
pipe

Programmer: Jim Clark, Software Developer replied 8 years ago
Hi!

I got your code examples. I'll need to install Oracle to test it, and that will take me at least a day. I'm going to opt-out of the questions for now. Another expert may have a solution more quickly. I'll let you know once I have a chance to try out the code.

Thanks.

James
Ask Your Own Programming Question
Was this answer helpful?

How JustAnswer works

step-image
Describe your issueThe assistant will guide you
step-image
Chat 1:1 with a programmerLicensed Experts are available 24/7
step-image
100% satisfaction guaranteeGet all the answers you need
Ask Jim Clark Your Own Question
Jim Clark
Jim Clark
Jim Clark, Software Developer
Category: Programming
Satisfied Customers: 422
422 Satisfied Customers
Experience: 25 years of programming experience. 15 years in web development.

Jim Clark is online now

A new question is answered every 9 seconds

How JustAnswer works:

  • Ask an ExpertExperts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional AnswerVia email, text message, or notification as you wait on our site. Ask follow up questions if you need to.
  • 100% Satisfaction GuaranteeRate the answer you receive.

JustAnswer in the News:

Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.

What Customers are Saying:

My Expert answered my question promptly and he resolved the issue totally. This is a great service. I am so glad I found it I will definitely use the service again if needed.

One Happy CustomerNew York

Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help.

Mary C.Freshfield, Liverpool, UK

This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!!

AlexLos Angeles, CA

Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult.

GPHesperia, CA

I couldn't be more satisfied! This is the site I will always come to when I need a second opinion.

JustinKernersville, NC

Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around.

EstherWoodstock, NY

Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know.

RobinElkton, Maryland

< Previous | Next >

Meet the Experts:

ATLPROG

ATLPROG

Computer Software Engineer

7,677 satisfied customers

MS in IT.Several years of programming experience in Java C++ C C# Python VB Javascript HTML

LogicPro

LogicPro

Computer Software Engineer

7,175 satisfied customers

Expert in C, C++, Java, DOT NET, Python, HTML, Javascript, Design.

unvadim

unvadim

Computer Software Engineer

1,168 satisfied customers

Good knowledge of OOP principles. 3+ years of programming experience with Java and C++. Sun Certified Java Programmer 5.0.

lifesaver

lifesaver

Computer Software Engineer

950 satisfied customers

Several years of intensive programming and application development experience in various platforms.

ehabtutor

ehabtutor

Computer Software Engineer

936 satisfied customers

Bachelor of computer science, 5+ years experience in software development, software company owner

TheDoctor

TheDoctor

Software Engineer

893 satisfied customers

M.S. in Internet Information Systems

The-PC-Guy

The-PC-Guy

Software Engineer

848 satisfied customers

Extensive Knowledge in PHP, MYSQL, CSS & Javascript

< Previous | Next >

Related Programming Questions
Use C# - In this HW you are going to develop a database
Use C# - In this HW you are going to develop a database application that will show the Top 500 Rock and Roll Songs. Here is what you are going to do (I left out some of the details for you to figure o… read more
George Sibiya
George Sibiya
PhD
313 satisfied customers
Write a program that will check the salary of an employee in
Write a program that will check the salary of an employee in the Emp table. Write the program such that it displays the employee number, name, job, salary, and department name, if the salary of the em… read more
Satchi
Satchi
Bachelor\u0027s Degree
2,103 satisfied customers
In this project you will perform the physical design and implementation
In this project you will perform the physical design and implementation using SQL Data Definition Language (DDL) and proceed with populating the Mom and Pop Johnson Video Store database via Data Manip… read more
jatechexpert
jatechexpert
Master\u0027s Degree
1 satisfied customers
Create Oracle database tables using SQL Data Definition Language
Create Oracle database tables using SQL Data Definition Language (DDL) for each table listed in Project 1. Make sure that entity and referential integrity are enforced by declaring a primary key for e… read more
C.Martin
C.Martin
IT Consultant
Bachelor's Degree
453 satisfied customers
I need help with an SQL database. The assignment involves the
I need help with an SQL database. The assignment involves the physical design and implementation using SQL Data Definition Language (DDL) and proceed with populating a database from an ERD that has be… read more
TheDoctor
TheDoctor
Software Engineer
Master's Degree
893 satisfied customers
I am in desperate need to help with my SQL homework, the tables
I am in desperate need to help with my SQL homework, the tables can be found here: http://www.4shared.com/file/P0eTfK6K/tables.html?refurl=d1url 1. From the employee table, count the number of employe… read more
C.Martin
C.Martin
IT Consultant
Bachelor's Degree
453 satisfied customers
1. Create Oracle database tables using SQL Data Definition
1. Create Oracle database tables using SQL Data Definition Language (DDL) for each table listed in Project 1. Make sure that entity and referential integrity are enforced by declaring a primary key fo… read more
LogicPro
LogicPro
Computer Software Engineer
Bachelor of Technology
7,175 satisfied customers
LogicPro: I have 2 assignment and need your assistance:
Hello, LogicPro: I have 2 assignment and need your assistance: Using either the Derby Database or MySQL database from within NetBeans create an empty database called "registrar". Using an editor creat… read more
LogicPro
LogicPro
Computer Software Engineer
Bachelor of Technology
7,175 satisfied customers
Write the SQL statements to accomplish the following tasks Using
Write the SQL statements to accomplish the following tasks: Using either the Derby Database or MySQL database from within NetBeans create an empty database called "registrar". Using an editor create a… read more
LogicPro
LogicPro
Computer Software Engineer
Bachelor of Technology
7,175 satisfied customers
Write the SQL statements to accomplish the following tasks 1.Using
Write the SQL statements to accomplish the following tasks: 1.Using either the Derby Database or MySQL database from within NetBeans create an empty database called "registrar". 2.Using an editor crea… read more
LogicPro
LogicPro
Computer Software Engineer
Bachelor of Technology
7,175 satisfied customers
For LogicPro Only Write the SQL statements to accomplish
"For LogicPro Only" Write the SQL statements to accomplish the following tasks: 1.Using either the Derby Database or MySQL database from within NetBeans create an empty database called "registrar". 2.… read more
LogicPro
LogicPro
Computer Software Engineer
Bachelor of Technology
7,175 satisfied customers
I have a question regarding Java again, Im trying to create
I have a question regarding Java again, I'm trying to create a JTable to connect it from NetBeans Java to MySQL so that I can pull the database from MySQL into the java table. Problem is, I can't seem… read more
LogicPro
LogicPro
Computer Software Engineer
Bachelor of Technology
7,175 satisfied customers
I have to write a script for these queries 1.Using the BOOK_CUSTOMER
I have to write a script for these queries 1.Using the BOOK_CUSTOMER table and the NVL2 function, create a query that will return a list containing the customer number, first name, last name, and the … read more
Steve The IT Guy
Steve The IT Guy
Master\u0027s Degree
54 satisfied customers
LogicPro can you help with this Write the SQL statements
LogicPro can you help with this? Write the SQL statements to accomplish the following tasks: 1. Using either the Derby Database or MySQL database from within NetBeans create an empty database called "… read more
LogicPro
LogicPro
Computer Software Engineer
Bachelor of Technology
7,175 satisfied customers
Can someone give me a help with these queries, they need to
Can someone give me a help with these queries, they need to be done in SQL. Can you do these by Friday 8/20/10? I have attached these two .txt files needed. http://wikisend.com/download/447760/TV_Guid… read more
Ingo U
Ingo U
Master\u0027s Degree
358 satisfied customers
Hi, I have written some excel code that should do the following 1.
Hi, I have written some excel code that should do the following 1. Retrieve data from an SQL database and populate a table in excel with it. The data will be between two user defined dates 2. Update d… read more
Louis vdW
Louis vdW
Bachelor's Degree
92 satisfied customers
how do I add a new record and populate a field in the new record
how do I add a new record and populate a field in the new record with the data inserted for a query search if it does not find a record with the specified data.… read more
Julio
Julio
Bachelor\u0027s Degree
394 satisfied customers
SQL Assignment http //wikisend.com/download/484488/ tables http //wikisend.
SQL Assignment: http://wikisend.com/download/484488/ tables: http://wikisend.com/download/437778/ http://wikisend.com/download/456180/ http://wikisend.com/download/485804/ http://wikisend.com/download… read more
C.Martin
C.Martin
IT Consultant
Bachelor's Degree
453 satisfied customers
Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Show MoreShow Less

Ask Your Question

x