Click here to Skip to main content
15,888,177 members
Home / Discussions / Database
   

Database

 
GeneralRe: distinct? Pin
laserbaronen20-May-08 23:31
laserbaronen20-May-08 23:31 
GeneralRe: distinct? Pin
Blue_Boy20-May-08 23:32
Blue_Boy20-May-08 23:32 
QuestionPrimary Keys Pin
MAW3020-May-08 16:50
MAW3020-May-08 16:50 
AnswerRe: Primary Keys Pin
ChandraRam20-May-08 21:00
ChandraRam20-May-08 21:00 
QuestionInner Join to match multiple rows in lookup table Pin
redivider20-May-08 10:59
redivider20-May-08 10:59 
AnswerRe: Inner Join to match multiple rows in lookup table Pin
WoutL20-May-08 20:12
WoutL20-May-08 20:12 
GeneralRe: Inner Join to match multiple rows in lookup table Pin
redivider21-May-08 4:57
redivider21-May-08 4:57 
Questionsql very long?? Pin
foryou20-May-08 1:52
foryou20-May-08 1:52 
Hi;
my english is bad sorry Blush | :O
I have a table
review (note, #code_matiere, #num_inscription)
I created a pivot table from it.
and I showed it in a gridview
I add column moyennemodule which is the average of 4 matter and column avggeneral average of moduls.
I mean General sql following:
<code>
SELECT Num_Inscription, [1] AS '1', [2] AS '2', [3] AS '3' , (([ 1 ]*(select COEFF from MATIERE where code_mat=1))+&lt;b&gt;([2]*(select COEFF from MATIERE where code_mat=2)))/ ((select COEFF from MATIERE where code_mat=1)+(select COEFF from MATIERE where code_mat=2))AS moymod1 ,........as moymod2,..............as moymod3,...........asmoymod5&lt;/b&gt;

FROM
(SELECT Code_mat, Num_Inscription, Note
FROM Examen ) p
PIVOT
(
SUM(Note)
FOR Code_Mat IN
( [1], [2], [3])
) AS pvt</code>
i have 5 module I must repeat the part in bold and 5 times ,and the overall average which is sum (moymod) / 8 I have to redo the code in bold 8 times so de sql is very long.
Do you have a solution.
thanks
GeneralHelp me please. Pin
foryou21-May-08 1:53
foryou21-May-08 1:53 
QuestionRetrieve from DataBase Pin
Mr. Wonderful20-May-08 0:02
Mr. Wonderful20-May-08 0:02 
AnswerRe: Retrieve from DataBase Pin
Blue_Boy20-May-08 3:14
Blue_Boy20-May-08 3:14 
QuestionWhy the exception "Could not save; currently locked by another user" is coming? Pin
nicolus19-May-08 23:50
nicolus19-May-08 23:50 
QuestionLoad file in SQL Server from FileSystem Pin
JoZ CaVaLLo19-May-08 23:24
JoZ CaVaLLo19-May-08 23:24 
QuestionSql server reporting service 2005 - Drill down problem Pin
veereshIndia19-May-08 22:26
veereshIndia19-May-08 22:26 
AnswerCP Ignore Pin
leckey20-May-08 3:27
leckey20-May-08 3:27 
QuestionSql Server 2005 reporting service-Toggle problem Pin
veereshIndia19-May-08 22:15
veereshIndia19-May-08 22:15 
QuestionPartially solved SQL SELECT won't select more than two columns [modified] Pin
Vaclav_19-May-08 16:59
Vaclav_19-May-08 16:59 
AnswerRe: SQL SELECT won't select more than two columns Pin
Mycroft Holmes19-May-08 23:16
professionalMycroft Holmes19-May-08 23:16 
GeneralRe: SQL SELECT won't select more than two columns Pin
Vaclav_20-May-08 2:50
Vaclav_20-May-08 2:50 
QuestionHow can i get max Point and Min Date using SQL [modified] Pin
mangrovecm19-May-08 16:20
mangrovecm19-May-08 16:20 
AnswerRe: How can i get max Point and Min Date using SQL Pin
WoutL19-May-08 21:32
WoutL19-May-08 21:32 
GeneralRe: How can i get max Point and Min Date using SQL Pin
mangrovecm20-May-08 3:52
mangrovecm20-May-08 3:52 
GeneralRe: How can i get max Point and Min Date using SQL Pin
WoutL20-May-08 20:02
WoutL20-May-08 20:02 
QuestionQuery Help Pin
Hulicat19-May-08 13:17
Hulicat19-May-08 13:17 
AnswerRe: Query Help Pin
Blue_Boy19-May-08 21:51
Blue_Boy19-May-08 21:51 

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.