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

Database

 
GeneralRe: SQL - Write Query with field names and table name stored in a table? Pin
Megan Jean28-Mar-14 12:17
Megan Jean28-Mar-14 12:17 
GeneralRe: SQL - Write Query with field names and table name stored in a table? Pin
PIEBALDconsult28-Mar-14 13:07
mvePIEBALDconsult28-Mar-14 13:07 
GeneralRe: SQL - Write Query with field names and table name stored in a table? Pin
Member 1071490931-Mar-14 22:45
Member 1071490931-Mar-14 22:45 
GeneralRe: SQL - Write Query with field names and table name stored in a table? Pin
PIEBALDconsult1-Apr-14 3:21
mvePIEBALDconsult1-Apr-14 3:21 
AnswerRe: SQL - Write Query with field names and table name stored in a table? Pin
GuyThiebaut28-Mar-14 5:31
professionalGuyThiebaut28-Mar-14 5:31 
QuestionRemove duplicate rows in multiple join query Pin
Eng Hasan Abbas25-Mar-14 7:56
Eng Hasan Abbas25-Mar-14 7:56 
AnswerRe: Remove duplicate rows in multiple join query Pin
Mycroft Holmes25-Mar-14 12:50
professionalMycroft Holmes25-Mar-14 12:50 
AnswerRe: Remove duplicate rows in multiple join query Pin
Chris Quinn25-Mar-14 22:02
Chris Quinn25-Mar-14 22:02 
Use the DISTINCT keyword

SQL
SELECT DISTINCT tbl_salles_bill.sb_id, ( tbl_salles_bill.sb_price_after_alll_dicount - tbl_salles_bill.sb_paid_money) as Dept,  
                      tbl_customer.cust_fName + ' ' + tbl_customer.cust_mName + ' ' + tbl_customer.cust_lName AS CustomerName, tbl_customer.cust_city, tbl_receiving_money_receipt.rmr_id, 
                       tbl_receiving_money_receipt.rmr_value AS Creditor
FROM         tbl_salles_bill INNER JOIN
                      tbl_customer ON tbl_salles_bill.cust_id = tbl_customer.cust_id  and tbl_salles_bill.sb_status='Paid'
                       left  JOIN
                      tbl_receiving_money_receipt ON tbl_customer.cust_id = tbl_receiving_money_receipt.cust_id and tbl_receiving_money_receipt.rmr_IsPaidForWhat = 'Paid without recieving goods'
WHERE     (tbl_customer.cust_id = 6) 

=========================================================
I'm an optoholic - my glass is always half full of vodka.
=========================================================

AnswerRe: Remove duplicate rows in multiple join query Pin
Member 1071490931-Mar-14 22:55
Member 1071490931-Mar-14 22:55 
QuestionOracle Error Pin
Member 867725124-Mar-14 19:49
Member 867725124-Mar-14 19:49 
AnswerRe: Oracle Error Pin
Kornfeld Eliyahu Peter24-Mar-14 20:13
professionalKornfeld Eliyahu Peter24-Mar-14 20:13 
GeneralRe: Oracle Error Pin
Member 867725124-Mar-14 20:38
Member 867725124-Mar-14 20:38 
GeneralRe: Oracle Error Pin
Jörgen Andersson24-Mar-14 21:34
professionalJörgen Andersson24-Mar-14 21:34 
AnswerRe: Oracle Error Pin
Member 1043154927-Mar-14 0:28
Member 1043154927-Mar-14 0:28 
QuestionComplex Query Pin
#realJSOP24-Mar-14 4:18
mve#realJSOP24-Mar-14 4:18 
AnswerRe: Complex Query Pin
Simon_Whale24-Mar-14 4:46
Simon_Whale24-Mar-14 4:46 
GeneralRe: Complex Query Pin
#realJSOP24-Mar-14 5:53
mve#realJSOP24-Mar-14 5:53 
QuestionGrouping Results by ElectionName Pin
samflex19-Mar-14 10:44
samflex19-Mar-14 10:44 
AnswerRe: Grouping Results by ElectionName Pin
Jörgen Andersson19-Mar-14 11:02
professionalJörgen Andersson19-Mar-14 11:02 
AnswerRe: Grouping Results by ElectionName Pin
Mycroft Holmes19-Mar-14 12:52
professionalMycroft Holmes19-Mar-14 12:52 
GeneralRe: Grouping Results by ElectionName Pin
samflex19-Mar-14 13:12
samflex19-Mar-14 13:12 
GeneralRe: Grouping Results by ElectionName Pin
Mycroft Holmes19-Mar-14 14:05
professionalMycroft Holmes19-Mar-14 14:05 
GeneralRe: Grouping Results by ElectionName Pin
samflex19-Mar-14 14:13
samflex19-Mar-14 14:13 
GeneralSSIS - Truncation may occur due to inserting data Pin
Smith201418-Mar-14 2:59
Smith201418-Mar-14 2:59 
AnswerRe: SSIS - Truncation may occur due to inserting data Pin
Kornfeld Eliyahu Peter18-Mar-14 3:00
professionalKornfeld Eliyahu Peter18-Mar-14 3:00 

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.