1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Otrada [13]
3 years ago
12

Write a SELECT statement that returns these columns from the Orders table: The CardNumber column The length of the CardNumber co

lumn The last four digits of the CardNumber columnWhen you get that working right, add the column that follows to the result set. This is more difficult because the column requires the use of functions within functions. A column that displays the last four digits of the CardNumber column in this format: XXXX-XXXX-XXXX-1234. In other words, use Xs for the first 12 digits of the card number and actual numbers for the last four digits of the number.selectCardNumber,len(CardNumber) as CardNumberLegnth,right(CardNumber, 4) as LastFourDigits,'XXXX-XXXX-XXXX-' + right(CardNumber, 4) as FormattedNumberfrom Orders
Computers and Technology
1 answer:
Pepsi [2]3 years ago
8 0

Answer:

SELECT

CardNumber,

len(CardNumber) as CardNumberLength,

right(CardNumber, 4) as LastFourDigits,

'XXXX-XXXX-XXXX-' + right(CardNumber, 4) as FormattedNumber

from Orders

Explanation:

The question you posted contains the answer (See answer section). So, I will only help in providing an explanation

Given

Table name: Orders

Records to select: CardNumber, length of CardNumber, last 4 digits of CardNumber

From the question, we understand that the last four digits should display the first 12 digits as X while the last 4 digits are displayed.

So, the solution is as follows:

SELECT ----> This implies that the query is to perform a select operation

CardNumber, ---> This represents a column to read

len(CardNumber) as CardNumberLength, -----> len(CardNumber) means that the length of card number is to be calculated.

as CardNumberLength implies that an CardNumberLength is used as an alias to represent the calculated length

right(CardNumber, 4) as LastFourDigits, --> This reads the 4 rightmost digit of column CardNumber

'XXXX-XXXX-XXXX-' + right(CardNumber, 4) as FormattedNumber --> This concatenates the prefix XXXX-XXXX-XXXX to the 4 rightmost digit of column CardNumber

as FormattedNumber implies that an FormattedNumber is used as an alias to represent record

from Orders --> This represents the table where the record is being read.

You might be interested in
Betty took her friends bowling. they rented 4 lane. 10 people need rent shoes and
bogdanovich [222]
First there are two groups, members and non-members, so you know that there are 4 people who are members, if you subtract 4 from ten that would mean 6 people are non-members. now, for the cost of the members would be (7.50 × 4) + (2.95 × 4) = 41.8$
for the non-member group or would be (9.75 × 6) + (3.95 ×6) = 82.2$ now add 41.8 to 82.2 which equals 124.0$ in total
4 0
4 years ago
Which of the following is the BEST example of the principle of least privilege? Correct Answer: Wanda has been given access to t
pishuonlain [190]

Answer: Wanda has been given access to the files that she needs for her job.

Explanation:

The principle of least privilege is when a user is only given the minimum level of permissions that he or she needs to perform a particular job function. This helps in reducing the risk of attackers having access to data.

The best example of the principle of least privilege is Wanda has been given access to the files that she needs for her job. Given access to all of the file servers or access to all of the files on one server is incorrect.

7 0
3 years ago
What element of art does this photograph show? A. shape B. space C. form D. tone E. line
maks197457 [2]

I would for sure say form because it doesn't look like a flat surface, instead it looks 3-D, but If it is multiple choice then I say do C,D, and E.

<em>Here is some advice tho, this question seems like an opinion question, soo, that means that you pick one that stands out to you and escribe why you think so in a descriptive way... if that is not the case then go ahead and use whatever i gave you. Just in case you may want to add a little more to the bolded answer I gave you, just to be professional, in case you do want to add more here is the defintion of form in case you need it</em>

In addition to form, they include line, shape, value, color, texture, and space. As an Element of Art, form connotes something that is three-dimensional and encloses volume, having length, width, and height, versus shape, which is two-dimensional, or flat.

<u><em>If this helps, I would like brainliest, when possible</em></u>

<em />

4 0
3 years ago
What is the purpose of a project overview?
andreyandreev [35.5K]

Answer:

option 3 should be the answer is this helps please give the brainliest award.

7 0
2 years ago
Read 2 more answers
When do programmers use If conditional statements? when they want a certain event to occur when a condition is met when they wan
lyudmila [28]

Answer:

when they want a certain event to occur when a condition is met

Explanation:

5 0
3 years ago
Read 2 more answers
Other questions:
  • The information security organization performs a significant role in the implementation of solutions that mitigate risk and cont
    6·1 answer
  • What country threatens Denmark at the beginning of Hamlet as evidenced in Marcellus’s question, "Why this same strict and most o
    13·1 answer
  • What information should the subtitles in the clips of your video per folio provide?
    14·1 answer
  • Low-end CRM systems are designed for companies like Boeing because they only have a few, large customers.
    11·1 answer
  • which of the following are available options when importing a photoshop document into adobe illustrator
    7·1 answer
  • Microsoft PowerPoint is popular software that allows you tocreate slides, handouts, notes, and outlines.
    12·1 answer
  • Name 3 supercomputers along with their cost, purpose and the country it is located.​
    15·1 answer
  • La tensión en Newtons necesaria para que una onda transversal cuya longitud de onda es​
    10·1 answer
  • Given three packets of size 2,500 Bytes (caution this is Bytes not bits) each are ready inside computer 1 to be transmitted onto
    14·1 answer
  • What are the advantages of cloud computing over computing on premises?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!