String manipulation functions

Assignment Help Business Management
Reference no: EM132293922

Oracle SQL

The purpose of this exercise is to provide the Marketing department with a method to sort a predefined data list by zip code, last name, first name so they can take advantage of bulk mailing rates.  

Assignment:

1. Here is the table with the following fields called "Homework1Data" with (4 fields), then run the inserts below into the table (Figure 1-1).

2. Please help with a single SQL Query that has the following fields (6 fields so they can easily be moved around using a Mail Merge) using these names (alias); Firstname, Lastname, Address, City, State, Zip be sure to sort by zip code, last name, first name

3. Turn in a copy of your SQL Query (single statement - not a procedure)

Hint:

The magic exist in the string manipulation functions (LENGTH, INSTR, SUBSTR, etc.)

Figure 1-1:

this is the TABLE homework1data (  name VARCHAR2(30),  address VARCHAR2(30),  location VARCHAR2(30),  zip VARCHAR2(10));

-----------------------------------------

INSERT INTO Homework1Data  

(Name, Address, Location, Zip) 

VALUES 

('Ferguson, Shawn M.', '1940 Fountainview Court', 'Reynoldsburg, Ohio', '43068');

INSERT INTO Homework1Data  

(Name, Address, Location, Zip) 

VALUES 

('Phillips, George', '19 Pleasant St.', 'Columbus, OH', '43231');

INSERT INTO Homework1Data  

(Name, Address, Location, Zip) 

VALUES 

('Thompson, Mary', '200 E. Main St.', 'Columbus, Oh', '43215');

INSERT INTO Homework1Data  

(Name, Address, Location, Zip) 

VALUES 

('Swatson, Robert', '584 Yellowstone Dr.', 'Westerville, OH', '43081');

INSERT INTO Homework1Data  

(Name, Address, Location, Zip) 

VALUES 

('Banks, Heather T.', '19 Pleasant St.', 'Columbus, Ohio', '43231');

This is the first part of the SQL query;

SELECT SUBSTR('Ferguson, Shawn M.' INSTR('Ferguson, Shawn M.',' '))

AS LASTNAME

FROM DUAL;

Reference no: EM132293922

Questions Cloud

Relationship between adult development and individuation : Many consider early and middle adulthood times of relatively little growth, but adults encounter a multitude of tasks and changes during these phases.
Quality of the development work : Something that is easy to overlook, but critical to the success of a systems project, is the quality of the development work.
Describe the perfect technology solution for teaching : Identify two additional advantages to conducting asynchronous courses for international students and how you would apply them to teach the subject.
Explain the role of gender in pay inequity : Describe and discuss 5 reasons used to explain the role of gender in pay inequity?
String manipulation functions : The purpose of this exercise is to provide the Marketing department with a method to sort a predefined data list by zip code, last name, first name
Describe effective methods you used : Summarize information from at least two scholarly journal articles from the Ashford University Library that will support your claims for your chosen topic.
Disadvantages of php and python for server side programming : What are the advantages and disadvantages of PHP and Python for server side programming
Discuss the pros and cons of hardware based virtualization : Why might virtualization be a great model for a public library or a testing center like Prometric? Support your response with examples and information
Evaluating the applicability of the study findings : An explanation of the types of descriptive and/or inferential statistics you might use to analyze the data gathered in the case study. Also explain how the.

Reviews

Write a Review

Business Management Questions & Answers

  Critically evaluate information from core business functions

Critically evaluate information from core business functions and the value chain to enhance organizational knowledge of strategic position and direction.

  Explain and contrast the protection to intellectual property

Explain and contrast the protection to intellectual property provided by trade secrets relative to that provided by patents

  Courts regarding the interpretation of contract terms

What are the rules used by Courts regarding the interpretation of contract terms? In other words, if the parties to a lawsuit are debating about what parts of a contract mean or say, how can the court come to a decision and decide how to interpre..

  Explain how you would implement the results in a cultural

These attitudes and perceptions are manifested in the practices and behaviours of individuals in the organization. Design a model with methods and procedures for analyzing diversity and explain how you would implement the results in a cultural di..

  Usability testing vs remote usability testing

How do you compare face-to-face usability testing vs remote usability testing? How do you determine which method you should use, when and what for?

  Domestic firms have internationalized

Historically, domestic firms have internationalized their operations to seize opportunities or deal with threats, or both. Post  what you think are the operational opportunities and threats in going global.

  Purpose of the equivalent-unit computation

Purpose of the equivalent-unit computation and how many units were completed and transferred out of Department A during February?

  Define absorption and variable costing

Choose a manufacturing company (this should be different than your accounting project company) and research the possible effects of absorption and variable costing on that company.

  How a worker in an entry-level position could

Explain how a worker in an entry-level position could be a systems thinker.

  Quality management

I have 2 questions to answer for my Quality Management Course's discussion boards this week and could use your help. The questions are:

  Discussion on training system

Give a brief explanation of each training medium, and when or why you would use each one. If you use outside sources please included citation.

  Example of a perfectly competitive market

Why are foreign exchange markets not an example of a perfectly competitive market?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd