Click here to Skip to main content
15,868,016 members
Home / Discussions / Database
   

Database

 
AnswerRe: How to sort result if data fields contains both numeric and character value Pin
Eddy Vluggen19-May-12 0:32
professionalEddy Vluggen19-May-12 0:32 
QuestionExcel, OleDb, ACE, and skipping header rows Pin
PIEBALDconsult17-May-12 10:46
mvePIEBALDconsult17-May-12 10:46 
AnswerRe: Excel, OleDb, ACE, and skipping header rows Pin
Jörgen Andersson17-May-12 11:39
professionalJörgen Andersson17-May-12 11:39 
GeneralRe: Excel, OleDb, ACE, and skipping header rows Pin
PIEBALDconsult17-May-12 14:20
mvePIEBALDconsult17-May-12 14:20 
GeneralRe: Excel, OleDb, ACE, and skipping header rows Pin
Jörgen Andersson17-May-12 20:36
professionalJörgen Andersson17-May-12 20:36 
GeneralRe: Excel, OleDb, ACE, and skipping header rows Pin
PIEBALDconsult21-May-12 8:38
mvePIEBALDconsult21-May-12 8:38 
GeneralRe: Excel, OleDb, ACE, and skipping header rows Pin
Jörgen Andersson21-May-12 9:59
professionalJörgen Andersson21-May-12 9:59 
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 

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.