Click here to Skip to main content
15,891,864 members
Home / Discussions / Database
   

Database

 
GeneralRe: Looking for a program for creating, compiling and hosting deductive databases with Datalog Pin
Dahamsta14-Jan-16 5:24
Dahamsta14-Jan-16 5:24 
Questiondatabase Pin
Nirma Singh12-Jan-16 0:34
Nirma Singh12-Jan-16 0:34 
AnswerRe: database Pin
Richard MacCutchan12-Jan-16 0:48
mveRichard MacCutchan12-Jan-16 0:48 
AnswerRe: database Pin
ZurdoDev12-Jan-16 1:32
professionalZurdoDev12-Jan-16 1:32 
QuestionMerging rows Pin
jonatan_5565-Jan-16 0:47
jonatan_5565-Jan-16 0:47 
AnswerRe: Merging rows Pin
Michael_Davies5-Jan-16 1:02
Michael_Davies5-Jan-16 1:02 
GeneralRe: Merging rows Pin
jonatan_5565-Jan-16 3:03
jonatan_5565-Jan-16 3:03 
GeneralRe: Merging rows Pin
Richard Deeming5-Jan-16 7:50
mveRichard Deeming5-Jan-16 7:50 
Try something like this:
SQL
SELECT
    S.shipId,
    S.number,
    S.reference,
    S.[weight],
    SA.addressLine As Source,
    DA.addressLine As Destination
FROM
    Shipments As S
    
    -- Source address:
    INNER JOIN ShipmentAddresses As SSA
    ON SSA.shipmentId = S.shipId And SSA.typeOfAddress = 0
    INNER JOIN Addresses As SA
    ON SA.addressId = SSA.addressId
    
    -- Destination address
    INNER JOIN ShipmentAddresses As DSA
    ON DSA.shipmentId = S.shipId And DSA.typeOfAddress = 1
    INNER JOIN Addresses As DA
    ON DA.addressId = DSA.addressId
;




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


GeneralRe: Merging rows Pin
jonatan_55617-Jan-16 8:06
jonatan_55617-Jan-16 8:06 
SuggestionRe: Merging rows Pin
Richard Deeming5-Jan-16 2:35
mveRichard Deeming5-Jan-16 2:35 
GeneralRe: Merging rows Pin
jonatan_5565-Jan-16 3:09
jonatan_5565-Jan-16 3:09 
QuestionUnable to open a file from the running application after the file name has been updated in the database Pin
Stephen Holdorf4-Jan-16 5:05
Stephen Holdorf4-Jan-16 5:05 
AnswerRe: Unable to open a file from the running application after the file name has been updated in the database Pin
Mycroft Holmes4-Jan-16 13:10
professionalMycroft Holmes4-Jan-16 13:10 
Questionplsql related issue Pin
Member 1191972229-Dec-15 18:35
Member 1191972229-Dec-15 18:35 
AnswerRe: plsql related issue Pin
Mycroft Holmes4-Jan-16 13:06
professionalMycroft Holmes4-Jan-16 13:06 
QuestionCreating .cst file from .csp file CodeSmith Pin
indian14328-Dec-15 21:11
indian14328-Dec-15 21:11 
AnswerRe: Creating .cst file from .csp file CodeSmith Pin
Mycroft Holmes4-Jan-16 13:03
professionalMycroft Holmes4-Jan-16 13:03 
QuestionSql_Index Pin
Member 1116162527-Dec-15 19:34
Member 1116162527-Dec-15 19:34 
AnswerRe: Sql_Index Pin
Mycroft Holmes27-Dec-15 19:38
professionalMycroft Holmes27-Dec-15 19:38 
AnswerRe: Sql_Index Pin
GuyThiebaut29-Dec-15 2:57
professionalGuyThiebaut29-Dec-15 2:57 
QuestionDatabase creation on an external HD Pin
Amr.Mohammad8725-Dec-15 7:22
Amr.Mohammad8725-Dec-15 7:22 
AnswerRe: Database creation on an external HD Pin
Eddy Vluggen28-Dec-15 23:39
professionalEddy Vluggen28-Dec-15 23:39 
QuestionCascading referential integrity. Pin
Member 1116162522-Dec-15 21:03
Member 1116162522-Dec-15 21:03 
QuestionRe: Cascading referential integrity. Pin
CHill6023-Dec-15 23:15
mveCHill6023-Dec-15 23:15 
AnswerRe: Cascading referential integrity. Pin
Eddy Vluggen24-Dec-15 1:25
professionalEddy Vluggen24-Dec-15 1:25 

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.