Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Trouble with Pubs query

Author  Topic 

rbrown0226
Starting Member

4 Posts

Posted - 2012-02-23 : 21:56:54
I am having some trouble creating the query below in the Pubs database using SQL Server R2. Any help would be greatly appreciated:

"Select the unique author id as ssn, the lastname and firstname separated by a comma (smith, joe) as Fullname from the authors table joined on the titleauthor table where the royaltyper is less than 50. Order the query by the fullname".

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-02-23 : 22:23:14
can you post the used query? the problem statement seems to be a strightforward one

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

rbrown0226
Starting Member

4 Posts

Posted - 2012-02-23 : 22:34:44
There is no query.
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2012-02-23 : 22:43:24
This seems like homework question. What have you tried so far ? Please post it here so that we can advice

But we will not do any homework here


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

rbrown0226
Starting Member

4 Posts

Posted - 2012-02-23 : 22:48:09
SELECT authors.au_id as SSN
, authors.au_fname
, au_lname
FROM authors
INNER JOIN titleauthor
ON authors.au_id = titleauthor.au_id
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-02-23 : 22:49:56
why? then what have you tried so far?
Dont expect answers to be spoonfed to you
Unless you try yourself, nobody is going to provide you solution

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

rbrown0226
Starting Member

4 Posts

Posted - 2012-02-23 : 22:59:33
Well that's a big fuckin' help.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-02-23 : 23:28:01
quote:
Originally posted by rbrown0226

Well that's a big fuckin' help.


Just think what you'll gain out of this if somebody is giving you the query.
For your own learning, try to do it yourself, of course we're there to help in case you face any issues
but we clearly need to see an attempt from yourself not just 'give me the answer' kind of threads

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2012-02-24 : 10:34:37
select 'This OP is a dick.' + ',' + ' Is this any help to you?' As FullName
Go to Top of Page
   

- Advertisement -