Click here to Skip to main content
15,881,715 members
Home / Discussions / Database
   

Database

 
QuestionSerial number in SQL Pin
draghu17-May-12 0:17
draghu17-May-12 0:17 
AnswerRe: Serial number in SQL Pin
Pablo Aliskevicius17-May-12 2:48
Pablo Aliskevicius17-May-12 2:48 
AnswerRe: Serial number in SQL Pin
Andy_L_J17-May-12 20:51
Andy_L_J17-May-12 20:51 
GeneralRe: Serial number in SQL Pin
draghu17-May-12 22:11
draghu17-May-12 22:11 
QuestionSybase DB access in windows 7 Pin
VenkataRamana.Gali16-May-12 17:29
VenkataRamana.Gali16-May-12 17:29 
AnswerRe: Sybase DB access in windows 7 Pin
JohnsonLuis16-May-12 21:07
JohnsonLuis16-May-12 21:07 
QuestionOne to Many Relationships - Tabular Display Pin
eddieangel16-May-12 10:36
eddieangel16-May-12 10:36 
AnswerRe: One to Many Relationships - Tabular Display Pin
Jörgen Andersson16-May-12 11:26
professionalJörgen Andersson16-May-12 11:26 
Assuming your statistics table looks like this:

useridpropertyvalue
1height180
1width100
2height170
2width110


This query:
SQL
Select  userid
       ,max(case when property = 'height' then value else null end) as height
       ,max(case when property = 'width' then value else null end) as width
from    properties
group by userid
Would get this result:
useridheightwidth
1180100
2170110


Depending on what database you're using, the pivot function might already be included and in that case it's easy enough to google how to use it.
Light moves faster than sound. That is why some people appear bright, until you hear them speak.
List of common misconceptions

GeneralRe: One to Many Relationships - Tabular Display Pin
eddieangel16-May-12 12:53
eddieangel16-May-12 12:53 
GeneralRe: One to Many Relationships - Tabular Display Pin
Jörgen Andersson17-May-12 1:51
professionalJörgen Andersson17-May-12 1:51 
GeneralRe: One to Many Relationships - Tabular Display Pin
eddieangel17-May-12 6:43
eddieangel17-May-12 6:43 
AnswerRe: One to Many Relationships - Tabular Display Pin
Mycroft Holmes16-May-12 12:47
professionalMycroft Holmes16-May-12 12:47 
AnswerRe: One to Many Relationships - Tabular Display Pin
PIEBALDconsult16-May-12 14:11
mvePIEBALDconsult16-May-12 14:11 
AnswerRe: One to Many Relationships - Tabular Display Pin
vvashishta16-May-12 20:15
vvashishta16-May-12 20:15 
Questionexport to text file + SQL Pin
jojoba201115-May-12 18:02
jojoba201115-May-12 18:02 
AnswerRe: export to text file + SQL Pin
vvashishta15-May-12 20:48
vvashishta15-May-12 20:48 
AnswerRe: export to text file + SQL Pin
Sandeep Mewara15-May-12 20:53
mveSandeep Mewara15-May-12 20:53 
QuestionRe: export to text file + SQL Pin
jojoba201115-May-12 21:53
jojoba201115-May-12 21:53 
QuestionHow to Update Database SQL express DB Pin
jojoba201114-May-12 22:06
jojoba201114-May-12 22:06 
AnswerRe: How to Update Database SQL express DB Pin
Chris Meech15-May-12 2:35
Chris Meech15-May-12 2:35 
QuestionRe: How to Update Database SQL express DB Pin
jojoba201115-May-12 5:10
jojoba201115-May-12 5:10 
QuestionSQL Server database updation from oracle database in realtime Pin
uspatel14-May-12 19:04
professionaluspatel14-May-12 19:04 
AnswerRe: SQL Server database updation from oracle database in realtime Pin
Mycroft Holmes14-May-12 22:23
professionalMycroft Holmes14-May-12 22:23 
GeneralRe: SQL Server database updation from oracle database in realtime Pin
uspatel14-May-12 22:44
professionaluspatel14-May-12 22:44 
GeneralRe: SQL Server database updation from oracle database in realtime Pin
Mycroft Holmes15-May-12 12:51
professionalMycroft Holmes15-May-12 12: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.