Monday, September 27, 2004

No Luck with the Job

Well I went to the interview today and had no luck on the SQL test. She stated the first one is the easiest and if you take more then 15mins to do then you probably will not succeed in the other questions.

The first question asked for me to search the employee database and return people with the same name. I had no clue how to reference the same table without ambigouty. Of course once I got home I think I figured it out.

Another question asked for me to find the sale date's month and return any that are 4 or more. At the time I was thinking of using some of the date functions, but they wouldn't help in this situation. Once I got home I figure using a function that allows me to read the first three or four letters and then count them could be an easy solution.

Another asked me to just return the employees information of who sold a certain product. This was like #4 and I thought this one was easy, until I saw a problem in the table's name. It had a space in it, how the F**K do you put a space in the name? It was something like "Order Invoice", and couldn't just put the words there. The word order is a key word. I also try dragging the name over to the query area and it did give me a solution.

After try these questions for an hour(time limit) and having no luck, I gave up. There were a total of 6 questions and I know I can figure them out.

3 comments:

William Andrus said...

Finding patterns and cross referencing is the easy stuff I already know that shit. I just couldn't figure out how to cross reference the same table with information in it already. By finding people with the same last name and first name and display them isn't a simple think by using LIKE. I think something like:

SELECT FirstName, LastName From EmployeeTable T1, EmployeeTable T2 WHERE T1.FirstName = T2.FirstName AND T1.LastName = T2.LastName

I don't know if that would work, didn't try it at the point.

William Andrus said...

I figure I can retry probably in a month if I figure out how they can put a space in the name of a table.

Anonymous said...

Hey Will,

It's Jacob (and Keith said to say hi)

For a table name with spaces, try [table name].

Think that should work :)
Peace