Click here to Skip to main content
15,896,207 members
Home / Discussions / Database
   

Database

 
QuestionADO.NET: DataRow + ForeignKey -> DataTable? Pin
peterchen21-Feb-07 10:48
peterchen21-Feb-07 10:48 
AnswerRe: ADO.NET: DataRow + ForeignKey -> DataTable? Pin
Mark J. Miller22-Feb-07 2:41
Mark J. Miller22-Feb-07 2:41 
QuestionDoes Adapter.GetData read all data? (noob) Pin
peterchen21-Feb-07 10:23
peterchen21-Feb-07 10:23 
AnswerRe: Does Adapter.GetData read all data? (noob) Pin
Mark J. Miller22-Feb-07 3:26
Mark J. Miller22-Feb-07 3:26 
GeneralConditional constraints Pin
Brady Kelly21-Feb-07 8:06
Brady Kelly21-Feb-07 8:06 
GeneralRe: Conditional constraints Pin
Mark J. Miller22-Feb-07 3:19
Mark J. Miller22-Feb-07 3:19 
QuestionMRD Pin
Ryno Burger21-Feb-07 6:43
Ryno Burger21-Feb-07 6:43 
QuestionGrouping data from SQL in ASP Pin
JennGom21-Feb-07 6:16
JennGom21-Feb-07 6:16 
Hi,

For the life of me, I haven't been able to figure the following out and I hoping someone out there can offer some good advice.

I have an ASP page that lists a lot of manuals and their associated new features for that particular release.
For example:
Manual title New Feature
manual 1 new feature1
manual 1 new feature2
manual 1 new feature3
manual 2 new feature1
manual 3 new feature1
manual 3 new feature2

Rather than have the same manual listed consecutively with a different new feature association, I would like to list the results as such:

Manual title New Feature
manual 1 new feature1
new feature2
new feature3
manual 2 new feature1
manual 3 new feature1
new feature2

Is this possible using ASP and SQL?

Here's the stored procedure:
<code>CREATE PROCEDURE [docadmin1].[sp_view_nfprodrel]
@product nvarchar (250)

AS
SELECT distinct top 100 Percent doc_id, title, relnum, substring(dn,3,14) as DN, product, New_Feature FROM nf_prodrel_man WHERE product = @product order by Title
GO</code>

Here's the view being called from the stored procedure:

<code>CREATE VIEW dbo.nf_prodrel_man
AS
SELECT TOP 100 PERCENT dbo.Books.Title + ' ' + dbo.Books.Rel_Num AS title, dbo.PROD_REL.Product, dbo.DOC_RELATIONSHIP.Doc_ID,
dbo.New_Feature.NF_ID, SUBSTRING(dbo.New_Feature.New_Feature, PATINDEX('% %', dbo.New_Feature.New_Feature),
LEN(dbo.New_Feature.New_Feature)) AS New_Feature, dbo.Books.DN, dbo.New_Feature.Description, RIGHT(dbo.PROD_REL.Product, 3)
AS RELNUM
FROM dbo.PROD_REL INNER JOIN
dbo.NF_PROD_REL ON dbo.PROD_REL.Prod_Rel_ID = dbo.NF_PROD_REL.Prod_REL_ID INNER JOIN
dbo.New_Feature ON dbo.NF_PROD_REL.NF_ID = dbo.New_Feature.NF_ID INNER JOIN
dbo.DOC_RELATIONSHIP ON dbo.NF_PROD_REL.REL_ID = dbo.DOC_RELATIONSHIP.REL_ID INNER JOIN
dbo.Books ON dbo.DOC_RELATIONSHIP.Doc_ID = dbo.Books.Doc_ID
ORDER BY dbo.Books.Title + ' ' + dbo.Books.Rel_Num, dbo.PROD_REL.Product</code>

Thanks in advance!

Regards,
Jenn
AnswerRe: Grouping data from SQL in ASP Pin
andyharman21-Feb-07 8:15
professionalandyharman21-Feb-07 8:15 
GeneralRe: Grouping data from SQL in ASP Pin
JennGom21-Feb-07 9:27
JennGom21-Feb-07 9:27 
QuestionRetain Benefits of Non-Normalized Table Pin
perlmunger21-Feb-07 4:54
perlmunger21-Feb-07 4:54 
AnswerRe: Retain Benefits of Non-Normalized Table Pin
Mark J. Miller22-Feb-07 3:00
Mark J. Miller22-Feb-07 3:00 
GeneralRe: Retain Benefits of Non-Normalized Table Pin
perlmunger22-Feb-07 4:50
perlmunger22-Feb-07 4:50 
QuestionWhat is wrong with my SQL string? Pin
JUNEYT21-Feb-07 3:16
JUNEYT21-Feb-07 3:16 
AnswerRe: What is wrong with my SQL string? Pin
Colin Angus Mackay21-Feb-07 3:19
Colin Angus Mackay21-Feb-07 3:19 
GeneralRe: What is wrong with my SQL string? Pin
JUNEYT21-Feb-07 3:36
JUNEYT21-Feb-07 3:36 
GeneralRe: What is wrong with my SQL string? Pin
Colin Angus Mackay21-Feb-07 3:55
Colin Angus Mackay21-Feb-07 3:55 
GeneralRe: What is wrong with my SQL string? Pin
JUNEYT21-Feb-07 4:31
JUNEYT21-Feb-07 4:31 
GeneralRe: What is wrong with my SQL string? Pin
peterchen21-Feb-07 11:51
peterchen21-Feb-07 11:51 
GeneralRe: What is wrong with my SQL string? Pin
Pete O'Hanlon21-Feb-07 4:46
mvePete O'Hanlon21-Feb-07 4:46 
AnswerRe: What is wrong with my SQL string? Pin
kubben21-Feb-07 3:27
kubben21-Feb-07 3:27 
GeneralUpdate Advice - Getting most recent value Pin
Brady Kelly21-Feb-07 2:15
Brady Kelly21-Feb-07 2:15 
GeneralRe: Update Advice - Getting most recent value Pin
andyharman21-Feb-07 2:25
professionalandyharman21-Feb-07 2:25 
GeneralRe: Update Advice - Getting most recent value Pin
Brady Kelly21-Feb-07 2:58
Brady Kelly21-Feb-07 2:58 
Questionsome question Pin
Imran Khan Pathan21-Feb-07 1:04
Imran Khan Pathan21-Feb-07 1:04 

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.