Click here to Skip to main content
15,898,134 members
Home / Discussions / Database
   

Database

 
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 
Hello,
I have the following query working well, however; I need to augment it and what seemed simple has really stumoed me. Maybe some of you can guide me in the right direction.



use db1

select distinct v.userid, v.firstname, v.lastname, c.[name]

as 'credential field', q.address, value from import3

inner join vulture v on v.userid = external

inner join credentialfielddef c on c.id = fieldid

inner join vulture_commo o on o.vultureid = v.id

inner join Commo q on q.id = o.vultureid where q.commotypeid like '4'

order by userid


Results look like this:

UserId Firstname Lastname Crednetial Field Value
GUID Jim Roberts Field1 Test1
GUID Jim Roberts Field2 Test2
GUID Jim Roberts Field3 Test3
GUID Jim Roberts Field4 Test4



Desired Result set:

UserId Firstname Lastname Field1 Field2 field3 field4
GUID Jim Roberts Test1 Test2 Test3 Test4


The schema is nightmare and it took me a while just to get where I am now but I am stuck and need a little insight as to the best approach. I have tried using varibles and considered case statements but I am truely lost.

Any help would be appreciated on the best method.

Regards,
Hulicat

AnswerRe: Query Help Pin
Blue_Boy19-May-08 21:51
Blue_Boy19-May-08 21:51 
GeneralRe: Query Help Pin
Hulicat20-May-08 3:50
Hulicat20-May-08 3:50 
GeneralRe: Query Help Pin
Blue_Boy20-May-08 4:03
Blue_Boy20-May-08 4:03 
QuestionTransaction question Pin
kensai19-May-08 5:17
kensai19-May-08 5:17 
AnswerRe: Transaction question Pin
J4amieC19-May-08 5:39
J4amieC19-May-08 5:39 
GeneralRe: Transaction question Pin
kensai19-May-08 5:52
kensai19-May-08 5:52 
QuestionOne more thing Pin
kensai19-May-08 6:44
kensai19-May-08 6:44 
QuestionHow to read an database table step by step (with ADO) Pin
harry7988019-May-08 3:35
harry7988019-May-08 3:35 
AnswerRe: How to read an database table step by step (with ADO) Pin
Adeel Chaudhry19-May-08 5:48
Adeel Chaudhry19-May-08 5:48 
AnswerRe: How to read an database table step by step (with ADO) Pin
Mycroft Holmes19-May-08 23:29
professionalMycroft Holmes19-May-08 23:29 
QuestionAppending the value with NULL value Pin
Revathij19-May-08 2:40
Revathij19-May-08 2:40 
AnswerRe: Appending the value with NULL value Pin
J4amieC19-May-08 3:14
J4amieC19-May-08 3:14 
Questionwhat is the use of indexes , when i creating table it already creating one index.......... Pin
Shaik Haneef19-May-08 0:52
Shaik Haneef19-May-08 0:52 
AnswerRe: what is the use of indexes , when i creating table it already creating one index.......... Pin
J4amieC19-May-08 1:22
J4amieC19-May-08 1:22 
AnswerRe: what is the use of indexes , when i creating table it already creating one index.......... [modified] Pin
Vinay Dornala19-May-08 19:31
Vinay Dornala19-May-08 19:31 
QuestionUpdate the value with a value in the table Pin
Revathij18-May-08 22:21
Revathij18-May-08 22:21 
AnswerRe: Update the value with a value in the table Pin
Alsvha18-May-08 22:44
Alsvha18-May-08 22:44 

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.