Click here to Skip to main content
15,886,806 members
Home / Discussions / Database
   

Database

 
GeneralRe: Nortwind database selection through database expert ??? Pin
Paddy Boyd21-Jul-08 2:30
Paddy Boyd21-Jul-08 2:30 
GeneralRe: Nortwind database selection through database expert ??? Pin
Paul Conrad21-Jul-08 6:13
professionalPaul Conrad21-Jul-08 6:13 
QuestionProblem in a query Pin
Shuaib wasif khan19-Jul-08 23:18
Shuaib wasif khan19-Jul-08 23:18 
AnswerRe: Problem in a query Pin
Colin Angus Mackay20-Jul-08 0:00
Colin Angus Mackay20-Jul-08 0:00 
GeneralRe: Problem in a query Pin
Shuaib wasif khan20-Jul-08 0:54
Shuaib wasif khan20-Jul-08 0:54 
GeneralRe: Problem in a query Pin
Blue_Boy20-Jul-08 2:50
Blue_Boy20-Jul-08 2:50 
GeneralRe: Problem in a query Pin
Shuaib wasif khan20-Jul-08 4:40
Shuaib wasif khan20-Jul-08 4:40 
GeneralRe: Problem in a query Pin
Wendelius20-Jul-08 9:29
mentorWendelius20-Jul-08 9:29 
AnswerRe: Problem in a query Pin
zahedonline21-Jul-08 1:43
zahedonline21-Jul-08 1:43 
Questionloading records problem Pin
harcaype19-Jul-08 16:50
harcaype19-Jul-08 16:50 
AnswerRe: loading records problem Pin
Ashfield20-Jul-08 8:20
Ashfield20-Jul-08 8:20 
QuestionRe: loading records problem Pin
harcaype22-Jul-08 3:28
harcaype22-Jul-08 3:28 
AnswerRe: loading records problem Pin
Ashfield22-Jul-08 8:44
Ashfield22-Jul-08 8:44 
QuestionOne to one Relationship problem Pin
snouto19-Jul-08 6:45
snouto19-Jul-08 6:45 
AnswerRe: One to one Relationship problem Pin
Wendelius19-Jul-08 8:39
mentorWendelius19-Jul-08 8:39 
AnswerRe: One to one Relationship problem Pin
zahedonline21-Jul-08 1:53
zahedonline21-Jul-08 1:53 
AnswerRe: One to one Relationship problem Pin
nelsonpaixao24-Jul-08 12:28
nelsonpaixao24-Jul-08 12:28 
QuestionNeed Arrange Query result into another table Header Pin
rrrriiizz19-Jul-08 1:45
rrrriiizz19-Jul-08 1:45 
AnswerRe: Need Arrange Query result into another table Header Pin
Ashfield20-Jul-08 8:06
Ashfield20-Jul-08 8:06 
GeneralRe: Need Arrange Query result into another table Header Pin
rrrriiizz20-Jul-08 22:54
rrrriiizz20-Jul-08 22:54 
AnswerRe: Need Arrange Query result into another table Header Pin
Mycroft Holmes20-Jul-08 14:47
professionalMycroft Holmes20-Jul-08 14:47 
take a look at Pivot. Use that with a dynamic sql to construct your book colums.
In this script the @List would bhe your book titles
<br />
BEGIN<br />
	Set @SQL = 'SELECT PortfolioID, Portfolio, ' + @List + char(13) <br />
	Set @SQL = @SQL + 'FROM (SELECT PortfolioID, Portfolio, A.Element, PFClass ' + char(13) <br />
	Set @SQL = @SQL + 'FROM vwPFAttribute A ' + char(13) <br />
	Set @SQL = @SQL + 'INNER JOIN PFTree T ON T.PFClassID = A.PFClassID AND T.TreeID = ' + CONVERT(VARCHAR(20),@TreeID) + char(13) <br />
	Set @SQL = @SQL + 'WHERE A.PortfolioID NOT IN (SELECT PortfolioID FROM dbo.fn_TreeExcludedPortfolios(' + CONVERT(VARCHAR(20),@TreeID) + ')))P' + char(13) <br />
<br />
	Set @SQL = @SQL + 'Pivot (Max(Element) For PFClass In ('  + @List + ')) as Pvt' + char(13) <br />
	Set @SQL = @SQL + 'Order By Portfolio'<br />
<br />
	Print @SQL<br />
END<br />
<br />


Never underestimate the power of human stupidity
RAH

GeneralRe: Need Arrange Query result into another table Header Pin
Paul Conrad20-Jul-08 14:55
professionalPaul Conrad20-Jul-08 14:55 
GeneralRe: Need Arrange Query result into another table Header Pin
Mycroft Holmes20-Jul-08 15:08
professionalMycroft Holmes20-Jul-08 15:08 
GeneralRe: Need Arrange Query result into another table Header Pin
rrrriiizz20-Jul-08 22:12
rrrriiizz20-Jul-08 22:12 
GeneralRe: Need Arrange Query result into another table Header Pin
Mycroft Holmes20-Jul-08 22:21
professionalMycroft Holmes20-Jul-08 22:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.