Click here to Skip to main content
15,890,506 members
Home / Discussions / Database
   

Database

 
Questioninserting a row into table from the form data Pin
Raheem MA5-Apr-07 23:52
Raheem MA5-Apr-07 23:52 
AnswerRe: inserting a row into table from the form data Pin
_mubashir6-Apr-07 3:21
_mubashir6-Apr-07 3:21 
AnswerRe: inserting a row into table from the form data Pin
Krish - KP6-Apr-07 3:48
Krish - KP6-Apr-07 3:48 
AnswerRe: inserting a row into table from the form data Pin
Ian Dennis6-Apr-07 7:38
Ian Dennis6-Apr-07 7:38 
QuestionInner Join Problem Pin
rkherath5-Apr-07 23:38
rkherath5-Apr-07 23:38 
AnswerRe: Inner Join Problem Pin
kubben6-Apr-07 2:08
kubben6-Apr-07 2:08 
GeneralRe: Inner Join Problem Pin
rkherath8-Apr-07 17:27
rkherath8-Apr-07 17:27 
AnswerRe: Inner Join Problem Pin
Krish - KP6-Apr-07 2:09
Krish - KP6-Apr-07 2:09 
As per what i understood hope this is what you are looking for ....

SELECT Year, Month, ProductID, Location, SUM(Sales), SUM(Returns),
SUM(DuePayments), SUM(Profit)
FROM (
SELECT Year,Month,ProductID,Location,Sales FROM TableA
UNION
SELECT Year,Month,ProductID,Location,Returns FROM TableB
UNION
SELECT Year,Month,ProductID,Location,DuePayment FROM TableC
UNION
SELECT Year,Month,ProductID,Location,Profit FROM TableD
)a
WHERE Month = 3
GROUP BY Year, Month, ProductID, Location




Regards
KP

Questionwhen DTS package fails runnig, display message Pin
indian1435-Apr-07 20:44
indian1435-Apr-07 20:44 
QuestionUnicode, VB 2005 and SQL Server 2000 Pin
San Vibol5-Apr-07 17:21
San Vibol5-Apr-07 17:21 
QuestionMySQL connection problem Pin
shabonaa5-Apr-07 13:46
shabonaa5-Apr-07 13:46 
AnswerRe: MySQL connection problem Pin
Hayder Marzouk6-Apr-07 7:53
Hayder Marzouk6-Apr-07 7:53 
AnswerRe: MySQL connection problem Pin
shabonaa6-Apr-07 10:10
shabonaa6-Apr-07 10:10 
QuestionExtracting Primary Key to use as a Foreign Key Pin
bweaver5-Apr-07 8:18
bweaver5-Apr-07 8:18 
AnswerRe: Extracting Primary Key to use as a Foreign Key Pin
mghiassi5-Apr-07 8:34
mghiassi5-Apr-07 8:34 
AnswerRe: Extracting Primary Key to use as a Foreign Key Pin
kubben5-Apr-07 8:37
kubben5-Apr-07 8:37 
AnswerRe: Extracting Primary Key to use as a Foreign Key Pin
bweaver5-Apr-07 8:50
bweaver5-Apr-07 8:50 
Questionsteps to include activeX scripting in a DTS package Pin
indian1435-Apr-07 1:12
indian1435-Apr-07 1:12 
QuestionOrder of procedures to add a table Pin
thecodedemon5-Apr-07 0:06
thecodedemon5-Apr-07 0:06 
QuestionWhat happened with my SQL transaction log file? Pin
Hanh Aeriscute5-Apr-07 0:00
Hanh Aeriscute5-Apr-07 0:00 
AnswerRe: What happened with my SQL transaction log file? Pin
Krish - KP6-Apr-07 4:24
Krish - KP6-Apr-07 4:24 
QuestionactiveX script for a SQL-Server DTS package Pin
indian1434-Apr-07 21:45
indian1434-Apr-07 21:45 
AnswerRe: activeX script for a SQL-Server DTS package Pin
Frank Kerrigan4-Apr-07 23:16
Frank Kerrigan4-Apr-07 23:16 
GeneralRe: activeX script for a SQL-Server DTS package Pin
indian1435-Apr-07 0:55
indian1435-Apr-07 0:55 
Questionwhats the date function for sql statement? Pin
neodeaths4-Apr-07 15:41
neodeaths4-Apr-07 15:41 

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.