Which SQL statement would you use?

View the Exhibit and examine the data in the PROMOTIONS table.
PROMO_BEGIN_DATE is stored in the default date format, dd-mon-rr.
You need to produce a report that provides the name, cost, and start date of all promos in the POST
category that were launched before January 1, 2000.
Which SQL statement would you use?

View the Exhibit and examine the data in the PROMOTIONS table.

PROMO_BEGIN_DATE is stored in the default date format, dd-mon-rr.
You need to produce a report that provides the name, cost, and start date of all promos in the POST
category that were launched before January 1, 2000.

Which SQL statement would you use?

A.
SELECT promo_name, promo_cost, promo_begin_date
FROM promotions
WHERE promo_category = ‘post’ AND promo_begin_date < ’01-01-00′;

B.
SELECT promo_name, promo_cost, promo_begin_date
FROM promotions
WHERE promo_cost LIKE ‘post%’ AND promo_begin_date < ’01-01-2000′;

C.
SELECT promo_name, promo_cost, promo_begin_date
FROM promotions
WHERE promo_category LIKE ‘P%’ AND promo_begin_date < ‘1-JANUARY-00’;

D.
SELECT promo_name, promo_cost, promo_begin_date
FROM promotions
WHERE promo_category LIKE ‘%post%’ AND promo_begin_date < ‘1-JAN-00’;



Leave a Reply 60

Your email address will not be published. Required fields are marked *


user

user

why is B incorrect? Please help pls.

noel

noel

Because of the format used in promo_begin_date < ’01-01-2000′;.

It should be DD-MON-RR

qiang

qiang

> select to_date(’01-01-2000′, ‘DD-MON-RR’, ‘NLS_DATE_LANGUAGE=ENGLISH’) from dual;
01843. 00000 – “not a valid month”

> select to_date(’01-Jan-2000′, ‘DD-MON-RR’, ‘NLS_DATE_LANGUAGE=ENGLISH’) from dual;
00-01-01

> select to_date(’01-Jan-00′, ‘DD-MON-RR’, ‘NLS_DATE_LANGUAGE=ENGLISH’) from dual;
00-01-01

B is not correct since Month is not correct.

Sri

Sri

In option D promo_category LIKE ‘%post%’ i think it shud b ‘P%’ as the category POST

Charfi wa

Charfi wa

For the option B:
promo_cost LIKE ‘post%’ / it is not the promo_cost it is the promo_category 😉

MJ11

MJ11

Assuming there no other category with ‘POST’ in its name, D is correct.

follar

follar

My wife and i were so joyful that John could round up his investigation through the precious recommendations he was given from your web pages. It is now and again perplexing to just be giving for free strategies which many people could have been trying to sell. And now we keep in mind we’ve got the website owner to give thanks to because of that. The entire illustrations you’ve made, the simple site navigation, the relationships you can help to engender – it’s got all terrific, and it’s assisting our son in addition to our family consider that the topic is thrilling, and that’s truly mandatory. Many thanks for the whole lot!

http://www.sitiosdecitas.es/meetic

Tommie Cayabyab

Tommie Cayabyab

I have to get across my appreciation for your kindness giving support to people that actually need help with this concept. Your personal commitment to getting the solution across had become really effective and has continuously made some individuals like me to realize their desired goals. Your own insightful advice denotes this much to me and somewhat more to my office workers. Many thanks; from all of us.

http://gusillham.livejournal.com/

Yu Stenberg

Yu Stenberg

Whats up very cool web site!! Man .. Beautiful .. Superb .. I will bookmark your web site and take the feeds additionally…I am happy to find a lot of useful information here in the put up, we want develop extra techniques on this regard, thank you for sharing.

http://www.scoop.it/t/click-link-by-odiliawontorq

Jessie Degelbeck

Jessie Degelbeck

Have you ever thought about creating an e-book or guest authoring on other blogs? I have a blog based upon on the same ideas you discuss and would love to have you share some stories/information. I know my visitors would enjoy your work. If you are even remotely interested, feel free to shoot me an email.

http://www.colourlovers.com/lover/larisarundst

Ezekiel Torrey

Ezekiel Torrey

i just didn’t need a kindle at first, but when receiving one for christmas i’m utterly converted. It supply genuine advantages over a book, and makes it such a lot additional convenient. i might undoubtedly advocate this item:

http://articles.org/catrinafarinl/

Aida Norenberg

Aida Norenberg

What your saying is completely proper. I know that all people must say the incredibly exact same issue, but I just presume that you put it in a way that everyone can totally grasp. I also actually like the photographs you position in the adhering to. They match so nicely with what youre attempting to say. Im guaranteed youll accomplish so quite a couple of men and women with what youve acquired to say.

http://www.pearltrees.com/sinamaustxz#item187216507

Kelly Kunich

Kelly Kunich

Oh my goodness! a fantastic write-up dude. Thank you However My business is experiencing problem with ur rss . Don’t know why Struggling to enroll in it. Possibly there is anybody finding identical rss difficulty? Anyone who knows kindly respond. Thnkx

http://www.aeriagames.com/user/meganlatin/

Andre Buttrum

Andre Buttrum

This sort of in search of get the enhancements made on this special lifestyle and diet, begin your L . a . Shifting the pounds diet solution is a huge procedure into accesing which usually hope. weight loss

http://www.colourlovers.com/lover/bernardinah

Denisha Jahde

Denisha Jahde

There are some fascinating time limits here however I don’t know if every one of them center to heart. There exists some validity however I’ll take hold opinion until I look into it further. Good article , thanks and now we want extra! Combined with FeedBurner as properly

http://www.inmethod.com/forum/user/editDone/58939.page

Alexia Petela

Alexia Petela

Hey there, You have done a fantastic job. I will definitely digg it and personally suggest to my friends. I’m sure they will be benefited from this web site.

https://www.plurk.com/LarisaRundstro

Jarod Frueh

Jarod Frueh

Wow! This could be one particular of the most helpful blogs We’ve ever arrive across on this subject. Actually Excellent. I am also an expert in this topic therefore I can understand your effort.

http://www.fontspace.com/profile/sinamau

Elvis Suben

Elvis Suben

Good blog! I really love how it is easy on my eyes as well equally the info are well written. I am wondering how I could be notified whenever a young position has been made. I experience subscribed to your rss flow which must do the trick! Experience a nice day!

http://www.aeriagames.com/user/chauschn/

Jerald Kousonsavath

Jerald Kousonsavath

Nice post. I understand some thing more difficult on diverse blogs everyday. It will always be stimulating you just read content from other writers and exercise a specific thing from their site. I’d would rather apply certain with all the content in this little blog no matter whether you don’t mind. Natually I’ll provide you with a link for your web weblog. Thank you for sharing.

http://www.fitday.com/fitness/forums/members/jadwigapenc.html

Lore Loperfido

Lore Loperfido

Also a thing to mention is that an online business administration program is designed for college students to be able to well proceed to bachelor degree education. The Ninety credit college degree meets the lower bachelor education requirements when you earn your own associate of arts in BA online, you’ll have access to up to date technologies with this field. Some reasons why students have to get their associate degree in business is because they may be interested in this area and want to find the general education and learning necessary just before jumping into a bachelor college diploma program. Thanks for the tips you provide inside your blog.

http://url.org/bookmarks/chauschnur

Maxwell Limes

Maxwell Limes

I can see you are an expert at your field! I am launching a website soon, and your details will be really fascinating for me.. Thanks for all your assist and wishing you all of the success.

http://www.kiwibox.com/larisarundst/mypage/

Virgilio Mousa

Virgilio Mousa

Kudos on your wonderful posting… We certainly liked reading this, you might be a terrific source I will always take a note of ones weblog and definitely will come back down the road I want to motivate yourself to continue this good posts, enjoy your weekend? OMG how about Gaddafi notable news! Thx ! Online Website Builder

http://thehot.me/beauty-is-everywhere/

Reinaldo Tanzman

Reinaldo Tanzman

It is very rare these days to find sites that provide info someone is looking for. I am glad to see that your website share valued info that can help to many readers. nice one and keep writing!

http://thehot.me/the-hidden-secrets-of-makeup/

Ezekiel Torrey

Ezekiel Torrey

What i do not realize is in reality how you’re now not actually much more neatly-favored than you may be right now. You’re very intelligent. You recognize therefore considerably relating to this topic, made me in my view consider it from a lot of varied angles. Its like women and men aren’t involved until it’s one thing to do with Girl gaga! Your own stuffs excellent. Always maintain it up!

http://thehot.me/the-hidden-secrets-of-makeup/

Oscar Burger

Oscar Burger

I enjoy reading it. I fundamental to learn more on this subject.. Thanks for the sake theme this marvellous post.. Anyway, I am gonna subscribe to your silage and I wish you post again soon.

http://thehot.me/beauty-is-everywhere/