Programming

Programming questions? Ask a programmer for answers ASAP

Ask a Computer Expert,
Get an Answer ASAP!

This answer was rated:

I'm using adventureworks2008 and trying to create a query…

I'm using adventureworks2008 and...

I'm using adventureworks2008 and trying to create a query but am lost and confused

Technician's Assistant: What programs and versions are you using?

Adventureworks 2008 and Microsoft sql server management studio

Technician's Assistant: What is your ideal outcome? How can we solve this for you?

Need a select statement that gives me the titles and file names of all documents produced for Karen Berge, Document Control Assistance at the company

Show More
Show Less
Ask Your Own Programming Question
Customer reply replied 1 year ago
Posted by JustAnswer at customer's request) Hello. I would like to request the following Expert Service(s) from you: Secure Remote Assistance.
Customer reply replied 1 year ago
Let me know if you need more information, or send me the service offer(s) so we can proceed.
Answered in 1 hour by:
7/6/2017
George Sibiya
George Sibiya, Computer Hardware Engineer
Category: Programming
Satisfied Customers: 364
Experience: PhD in Computer Science
Verified

Hi,

Welcome to JustAnswer and thank you for utilising our services.

Whats the name of your table and the list of its field/column names?

Regards,

G

Ask Your Own Programming Question
Customer reply replied 1 year ago
4 tables: Person.Person, HumaResources.Employee, Production.Document, and Production.ProductDocument

Ok thanks. And please provide column names in those tables?

Ask Your Own Programming Question
Customer reply replied 1 year ago
Here is a copy of the schema I am working from: www.defm.fmph.uniba.sk/.../odrobina/AdventureWorks2008_db_diagram.pdf

got it thanks. I'll post back

Ask Your Own Programming Question
Customer reply replied 1 year ago
I've attached the tables with column headings as well.

Please test this one for me:

SELECT title, filename FROM Product
JOIN Person ON Person.rowguid = Product.rowguid
JOIN Employee ON Employee.BusinessEntityId = Person.BusinessEntityId
Where Person.FirstName = 'Karen' AND Person.LastName = 'Berge' AND Employee.JobTitle = 'Document Control Assistance'

Ask Your Own Programming Question

Sorry it should be Document not Product:

SELECT title, filename FROM Document
JOIN Person ON Person.BusinessEntityID = Document.Owner
JOIN Employee ON Employee.BusinessEntityId = Person.BusinessEntityId
Where Person.FirstName = 'Karen' AND Person.LastName = 'Berge' AND Employee.JobTitle = 'Document Control Assistance

Ask Your Own Programming Question
Customer reply replied 1 year ago
when I execute it, I get the following message:
Msg 105, Level 15, State 1, Line 4
Unclosed quotation mark after the character string 'Document Control Assistance
'.
Msg 102, Level 15, State 1, Line 4
Incorrect syntax near 'Document Control Assistance
'.
Customer reply replied 1 year ago
I correct syntax error and get the following message:
Msg 208, Level 16, State 1, Line 1
Invalid object name 'Document'.

thanks for the update. Let me check it quickly

Ask Your Own Programming Question

Please test again:

SELECT title, filename FROM Production.Document
JOIN Person.Person ON Person.Person.BusinessEntityID = Production.Document.Owner
JOIN HumanResources.Employee ON HumanResources.Employee.BusinessEntityId = Person.Person.BusinessEntityId
Where Person.Person.FirstName = 'Karen' AND Person.Person.LastName = 'Berge' AND HumanResources.Employee.JobTitle = 'Document Control Assistance'

Ask Your Own Programming Question
Customer reply replied 1 year ago
get following error:
Msg 209, Level 16, State 1, Line 2
Ambiguous column name 'title'.
Customer reply replied 1 year ago
maybe use JobTitle?

Its a document title let me update it again

Ask Your Own Programming Question

SELECT Production.Document.title, Production.Document.filename FROM Production.Document
JOIN Person.Person ON Person.Person.BusinessEntityID = Production.Document.Owner
JOIN HumanResources.Employee ON HumanResources.Employee.BusinessEntityId = Person.Person.BusinessEntityId
Where Person.Person.FirstName = 'Karen' AND Person.Person.LastName = 'Berge' AND HumanResources.Employee.JobTitle = 'Document Control Assistance'

Ask Your Own Programming Question
Customer reply replied 1 year ago
Ok I did not get an error but nothing came forward. However, when I changed "assistance" to Assistant, I received 2 columns with 5 rows of data: Title and Filename columns
Customer reply replied 1 year ago
5 rows of data. I believe you did it
Customer reply replied 1 year ago
thank you very much.

Its a pleasure

Ask Your Own Programming Question
Customer reply replied 1 year ago
have a great morning. I might reach out to you sometime over next week.

Thanks, ***** ***** I'd be delighted to offer more assistance

George Sibiya
George Sibiya, Computer Hardware Engineer
Category: Programming
Satisfied Customers: 364
Experience: PhD in Computer Science
Verified
George Sibiya and 87 other Programming Specialists are ready to help you
Ask your own question now
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 George Sibiya Your Own Question
George Sibiya
George Sibiya
George Sibiya, Computer Hardware Engineer
Category: Programming
Satisfied Customers: 364
364 Satisfied Customers
Experience: PhD in Computer Science

George Sibiya 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
I need help with 10 use cases and I'm using SQL SERVER: A
I need help with 10 use cases and I'm using SQL SERVER:A customer requests the titles of all movies that are directed by "George Lucas" or by “Rich Christiano”. Write a single query that retrieves thi… read more
Bruce Wilner
Bruce Wilner
Master of Engineering
30 satisfied customers
I have an excel workbook exported from a SQL database. I
I have an excel workbook exported from a SQL database. I need to convert the data base to CSV, which i have done using workbook SaveAs, but I need the SQL data to refresh and resave as the same csv fi… read more
Ingo U
Ingo U
Master\u0027s Degree
358 satisfied customers
I need to convert my database from .mdf to .csv in order to
I need to convert my database from .mdf to .csv in order to change hhosting … read more
George Sibiya
George Sibiya
Computer Hardware Engineer
364 satisfied customers
I need someone to help me write a short sql code involving a
hi i need someone to help me write a short sql code involving a stored procedure and the transaction statement … read more
George Sibiya
George Sibiya
Computer Hardware Engineer
364 satisfied customers
I need help with SQL development design to address use cases
I need help with SQL development design to address use cases by stored procedure.For example: a. A customer rents the movies “X” and “Y”. Develop a parameterized stored procedure that supports a custo… read more
George Sibiya
George Sibiya
Computer Hardware Engineer
364 satisfied customers
Build a working sample of Huffman Trucking's fleet truck maintenance
sample of Huffman Trucking's fleet truck maintenance database. . Use the CREATE table statement to create a table for each entity for Huffman Trucking's fleet truck maintenance database. Use the INSER… read more
Expert
Expert
I have a query that runs against an oracle server and I want
I have a query that runs against an oracle server and I want to copy the result set to a SQL server. I am using Visual Studio 2008. I need to create the SQL statement on the fly via a script because t… read more
amit.gzp786
amit.gzp786
96 satisfied customers
Need to use SQL Management Studio 2008 to build an index on
Need to use SQL Management Studio 2008 to build an index on a datatable field. My Visual Studio application has a table with an auto-incrementing integer ID. But of course, several queries need to sea… read more
TheDoctor
TheDoctor
Software Engineer
Master's Degree
893 satisfied customers
I had SQL Server 2008 Developer's Edition on my Window 7 PC.
I had SQL Server 2008 Developer's Edition on my Window 7 PC. I found that Reporting Services would not run because of rights (My ID has administrator rights, but no password.) I created another ID wit… read more
Joe-S
Joe-S
Systems Administrator
47 satisfied customers
I started working on my Self-Paced Training Kit/MCTS EXAM 70-433
I started working on my Self-Paced Training Kit/MCTS EXAM 70-433 and I made a mistake somewhere by trying to download some practice database files including enabling filestream and this is the error m… read more
C.Martin
C.Martin
IT Consultant
Bachelor's Degree
453 satisfied customers
Resources: The entity relationship diagram and normalized tables
Resources: The entity relationship diagram and normalized tables from the Week Two individual assignment, SQL Server® and Reporting Services on the Toolwire® site, and Beginning Microsoft® SQL Server®… read more
jatechexpert
jatechexpert
Master\u0027s Degree
1 satisfied customers
I have a problem installing SQL Server Management Studio
I have a problem installing SQL Server Management Studio (SSMS) I went to the website where I can download SSMS 2008 Express (http://www.microsoft.com/download/en/details.aspx?id=7593). In the Instruc… read more
Eljon
Eljon
Software Developer Consultant
Associate Degree
562 satisfied customers
Hi, I am building a database using microsoft server 2008
Hi, I am building a database using microsoft server 2008 I have to do the following (I do not want you to do it for me I just need some clarification) Create an SQL server database for the Kudler Fine… read more
jatechexpert
jatechexpert
Master\u0027s Degree
1 satisfied customers
Hi, I am building a database using microsoft server 2008
Hi, I am building a database using microsoft server 2008 I have to do the following (I do not want you to do it for me I just need some clarification) Create an SQL server database for the Kudler Fine… read more
jatechexpert
jatechexpert
Master\u0027s Degree
1 satisfied customers
This is what I need help with for this week for a SQL Database
This is what I need help with for this week for a SQL Database server assignment Individual Table Queries • Create an SQL server database for the Kudler Fine Foods Virtual Organization. • Create the f… read more
jatechexpert
jatechexpert
Master\u0027s Degree
1 satisfied customers
I am trying to Load The AdventureWorks 2008 OLTP example database
I am trying to Load The AdventureWorks 2008 OLTP example database in Microsoft SQL 2008 so that I can practice Microsoft SQL Exercises. I keep encountering issues and would like to have help getting t… read more
Dharmendra
Dharmendra
Master\u0027s Degree
275 satisfied customers
Having problems installing SQL Express to run with Visual Studio.
Having problems installing SQL Express to run with Visual Studio. Need someone to walk me through it.… read more
Eljon
Eljon
Software Developer Consultant
Associate Degree
562 satisfied customers
I have a stored procedure that creates an xml result using
I have a stored procedure that creates an xml result using the xml explicit command. it's exactly what I want. I'm looking to either save it to a table as data type xml and then print it to a file. or… read more
Aaron
Aaron
Senior CRM Developer
Bachelor\u0027s Degree
28 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