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

Database

 
QuestionCreate 2 sets of results using old school foxpro or dbase III dbf files Pin
jkirkerx16-Oct-14 10:49
professionaljkirkerx16-Oct-14 10:49 
AnswerRe: Create 2 sets of results using old school foxpro or dbase III dbf files Pin
David Mujica17-Oct-14 2:54
David Mujica17-Oct-14 2:54 
Questiongood book to clear the concept of Sql,Dynamic Procedures and User defined Functions Pin
johnpol1215-Oct-14 0:04
johnpol1215-Oct-14 0:04 
AnswerRe: good book to clear the concept of Sql,Dynamic Procedures and User defined Functions Pin
ZurdoDev15-Oct-14 5:45
professionalZurdoDev15-Oct-14 5:45 
QuestionConvert row to columns in SQL View or Procedure Pin
Member 1115418814-Oct-14 19:52
Member 1115418814-Oct-14 19:52 
AnswerRe: Convert row to columns in SQL View or Procedure Pin
Mycroft Holmes14-Oct-14 21:09
professionalMycroft Holmes14-Oct-14 21:09 
QuestionJoin a 3rd table, in which multiple records with the same id exist, but I just need 1 of them Pin
jkirkerx14-Oct-14 9:14
professionaljkirkerx14-Oct-14 9:14 
So I have 3 Tables
OrderInfo - Unique records
ShipRates - Unique records
OrderInfo_Emails - A list of non-unique records

There are 3 records in orderinfo, but I get 4 results back, because orderinfo_email has 2 records with the same orderinfo id. So I get that, why I get 4 back and not 3

Should I just drop the OrderInfo_Email Join and do something else, some other way, or is there a way to limit the results from the join?

SELECT 
  oi.OrderInfoID 
, oi.OrderDate
, oi.OrderNum 
, oi.LoginID
, oi.OrderStatus
, oi.AuthorizationID
, oi.ApprovalCode
, oi.Shipping
, oi.PaymentInfo
, oi.SubTotal
, oi.GrandTotal
, oi.RateAPICode
, oi.TotalNetCharge
, srr.RateName
, oie.MessageID
, oie.DateSent
, oie.SentBy
 FROM OrderInfo oi
 LEFT JOIN ORDERINFO_EMAIL oie
 ON (oie.OrderID = oi.OrderInfoID )
 LEFT JOIN Shipping_RealTime_Rates srr
 ON (srr.RateAPICode = oi.RateAPICode)
 ORDER BY oi.OrderDate DESC

GeneralRe: Join a 3rd table, in which multiple records with the same id exist, but I just need 1 of them Pin
Kornfeld Eliyahu Peter14-Oct-14 9:23
professionalKornfeld Eliyahu Peter14-Oct-14 9:23 
GeneralRe: Join a 3rd table, in which multiple records with the same id exist, but I just need 1 of them Pin
jkirkerx14-Oct-14 9:33
professionaljkirkerx14-Oct-14 9:33 
AnswerRe: Join a 3rd table, in which multiple records with the same id exist, but I just need 1 of them Pin
Kornfeld Eliyahu Peter14-Oct-14 9:38
professionalKornfeld Eliyahu Peter14-Oct-14 9:38 
GeneralRe: Join a 3rd table, in which multiple records with the same id exist, but I just need 1 of them Pin
jkirkerx14-Oct-14 9:53
professionaljkirkerx14-Oct-14 9:53 
QuestionString or binary data would be truncated. Pin
vJay Yadav6-Oct-14 22:33
professionalvJay Yadav6-Oct-14 22:33 
AnswerRe: String or binary data would be truncated. Pin
Mycroft Holmes6-Oct-14 23:09
professionalMycroft Holmes6-Oct-14 23:09 
GeneralRe: String or binary data would be truncated. Pin
vJay Yadav7-Oct-14 2:28
professionalvJay Yadav7-Oct-14 2:28 
AnswerRe: String or binary data would be truncated. Pin
Richard Deeming7-Oct-14 1:39
mveRichard Deeming7-Oct-14 1:39 
GeneralRe: String or binary data would be truncated. Pin
vJay Yadav7-Oct-14 2:28
professionalvJay Yadav7-Oct-14 2:28 
AnswerMessage Closed Pin
6-Oct-14 6:45
askbbrewer6-Oct-14 6:45 
AnswerSQL Server 2008 R2 log growth question - solved! Pin
GuyThiebaut4-Oct-14 8:28
professionalGuyThiebaut4-Oct-14 8:28 
SuggestionRe: SQL Server 2008 R2 log growth question Pin
Richard Deeming6-Oct-14 1:51
mveRichard Deeming6-Oct-14 1:51 
GeneralRe: SQL Server 2008 R2 log growth question Pin
GuyThiebaut6-Oct-14 1:58
professionalGuyThiebaut6-Oct-14 1:58 
QuestionMax throughput Microsoft SQL Server? Pin
devvvy2-Oct-14 13:05
devvvy2-Oct-14 13:05 
GeneralRe: Max throughput Microsoft SQL Server? Pin
PIEBALDconsult2-Oct-14 13:36
mvePIEBALDconsult2-Oct-14 13:36 
AnswerRe: Max throughput Microsoft SQL Server? Pin
Mycroft Holmes2-Oct-14 22:15
professionalMycroft Holmes2-Oct-14 22:15 
AnswerRe: Max throughput Microsoft SQL Server? Pin
Eddy Vluggen3-Oct-14 7:33
professionalEddy Vluggen3-Oct-14 7:33 
AnswerRe: Max throughput Microsoft SQL Server? Pin
jschell3-Oct-14 9:32
jschell3-Oct-14 9:32 

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.