Click here to Skip to main content
15,909,039 members
Home / Discussions / Database
   

Database

 
AnswerRe: complex SQL statement? Pin
Colin Angus Mackay30-Jul-06 23:36
Colin Angus Mackay30-Jul-06 23:36 
QuestionDelete Carriage Return Pin
oskardiazdeleon30-Jul-06 21:13
oskardiazdeleon30-Jul-06 21:13 
AnswerRe: Delete Carriage Return Pin
Eric Dahlvang31-Jul-06 3:37
Eric Dahlvang31-Jul-06 3:37 
QuestionCopy two xml doc in to a table in sql Pin
kalyan_vb30-Jul-06 17:43
kalyan_vb30-Jul-06 17:43 
AnswerRe: Copy two xml doc in to a table in sql Pin
tanya foster2-Aug-06 10:52
tanya foster2-Aug-06 10:52 
QuestionOffice Wob Components: PivotTable, SpreadSheet ... Pin
hamidreza_buddy30-Jul-06 4:22
hamidreza_buddy30-Jul-06 4:22 
Questionget the difference of two attributes in two tables Pin
00thilani29-Jul-06 20:23
00thilani29-Jul-06 20:23 
AnswerRe: get the difference of two attributes in two tables Pin
Colin Angus Mackay29-Jul-06 22:53
Colin Angus Mackay29-Jul-06 22:53 
00thilani wrote:
both have same attributes


Attributes? Do you mean "columns"?

00thilani wrote:
superkeys


I am unfamiliar with that term. Do you mean "primary key"? Or perhaps "foreign key"?

Perhaps this will work:

SELECT 
    curr_val, 
    Items_Rs - Items_Is AS items_difference, 
    Amount_Rs - Amount_Is AS difference_amount
FROM (
      SELECT curr_val, count(*) AS Items_Rs, SUM(amount) AS Amount_Rs 
      FROM RECEIVE 
      WHERE coin_note='n'
      GROUP BY curr_val
     ) AS Received
INNER JOIN (
            SELECT curr_val, count(*) AS Items_Is, SUM(amount) AS Amount_Is 
            FROM ISSUE 
            WHERE coin_note='n'
            GROUP BY curr_val
           ) AS Issued
ON Issued.curr_val = Received.curr_val



GeneralEmbeddable SQL database Pin
Jörgen Sigvardsson29-Jul-06 12:38
Jörgen Sigvardsson29-Jul-06 12:38 
GeneralRe: Embeddable SQL database Pin
S Douglas29-Jul-06 19:59
professionalS Douglas29-Jul-06 19:59 
GeneralRe: Embeddable SQL database [modified] Pin
Jörgen Sigvardsson30-Jul-06 0:06
Jörgen Sigvardsson30-Jul-06 0:06 
GeneralRe: Embeddable SQL database Pin
S Douglas30-Jul-06 21:14
professionalS Douglas30-Jul-06 21:14 
GeneralRe: Embeddable SQL database Pin
Jörgen Sigvardsson30-Jul-06 21:20
Jörgen Sigvardsson30-Jul-06 21:20 
GeneralRe: Embeddable SQL database Pin
S Douglas30-Jul-06 21:53
professionalS Douglas30-Jul-06 21:53 
GeneralRe: Embeddable SQL database Pin
Jörgen Sigvardsson30-Jul-06 22:12
Jörgen Sigvardsson30-Jul-06 22:12 
GeneralRe: Embeddable SQL database Pin
S Douglas5-Aug-06 6:50
professionalS Douglas5-Aug-06 6:50 
QuestionIncrease the speed when fetching bulk data from database using asp.net Pin
Ravi kumar G29-Jul-06 2:49
Ravi kumar G29-Jul-06 2:49 
AnswerRe: Increase the speed when fetching bulk data from database using asp.net Pin
Colin Angus Mackay29-Jul-06 9:03
Colin Angus Mackay29-Jul-06 9:03 
QuestionHow to avoid duplicate entries in DataTable. Pin
VenkataRamana.Gali28-Jul-06 21:16
VenkataRamana.Gali28-Jul-06 21:16 
QuestionReporting Services - PLEASE HELP! Pin
VK-Cadec28-Jul-06 7:52
VK-Cadec28-Jul-06 7:52 
AnswerRe: Reporting Services - PLEASE HELP! Pin
ToddHileHoffer28-Jul-06 8:10
ToddHileHoffer28-Jul-06 8:10 
GeneralRe: Reporting Services - PLEASE HELP! Pin
VK-Cadec28-Jul-06 8:14
VK-Cadec28-Jul-06 8:14 
GeneralRe: Reporting Services - PLEASE HELP! Pin
ToddHileHoffer28-Jul-06 8:18
ToddHileHoffer28-Jul-06 8:18 
GeneralRe: Reporting Services - PLEASE HELP! Pin
VK-Cadec28-Jul-06 8:27
VK-Cadec28-Jul-06 8:27 
GeneralRe: Reporting Services - PLEASE HELP! Pin
ToddHileHoffer28-Jul-06 8:48
ToddHileHoffer28-Jul-06 8:48 

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.