query problem
From: kurt (amitberry81_at_rediffmail.com)
Date: 03/17/04
- Next message: Norman: "add FK constraint with nocheck"
- Previous message: Vishal Parkar: "Re: How to limit the number of sql statements ?"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 16 Mar 2004 22:21:07 -0800
here goes !!
The problem is that if i am getting 4 rows of data corresponding to a unique number(PK). Then the first 5 columns of all the rows are same for all the 4 rows but the last column has diffrent values for all the rows.
ex
1 name 23 34 45 test1
1 name 23 34 45 test2
1 name 23 34 45 test3
1 name 23 34 45 test4
now the problem is that i want to display the result in the following manner
1 name 23 34 45 test1 test2 test3 test4
i need only 1 row for the result... and this should be returned by only one stored procedure.
i am unable to get the data of the last column to be displayed as rows.
the data here is comig from 3-4 diffrent tables using joins... the joiing field in these tables is the first field(value 1 here).
i have heard this can be doen using temprary table or arrays in sql.
please help me out here....
- Next message: Norman: "add FK constraint with nocheck"
- Previous message: Vishal Parkar: "Re: How to limit the number of sql statements ?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|