A really DUMB question...

A really DUMB question...

Post by Chris Peters » Wed, 17 Sep 2003 02:16:40



I have 4 tables (AA,MAIN,CC,DD)
Everything that is not in AA but is in MAIN I want put into CC
Everything that is not in MAIN but is in AA I want put into DD
Add everything in DD to MAIN
Clear AA CC and DD

Thanks in advance

 
 
 

A really DUMB question...

Post by DWinte » Wed, 17 Sep 2003 02:49:48


When you say put, do you mean copy or move?

 
 
 

A really DUMB question...

Post by Andy S » Wed, 17 Sep 2003 05:57:03


What is the purpose of CC, it doesn't seem to determine anything and then it
gets cleared?

INSERT cc
SELECT main.*
FROM main
WHERE main.rowid NOT IN (SELECT rowid from aa)

INSERT dd
SELECT aa.*
FROM aa
WHERE aa.rowid NOT IN (SELECT rowid from main)

INSERT main
SELECT * from dd

DELETE aa
DELETE cc
DELETE dd

--
*************************************
Andy S.

*************************************


Quote:> I have 4 tables (AA,MAIN,CC,DD)
> Everything that is not in AA but is in MAIN I want put into CC
> Everything that is not in MAIN but is in AA I want put into DD
> Add everything in DD to MAIN
> Clear AA CC and DD

> Thanks in advance

 
 
 

A really DUMB question...

Post by WangKh » Wed, 17 Sep 2003 11:11:49


I have 4 tables (AA,MAIN,CC,DD)
Everything that is not in AA but is in MAIN I want put into CC
Everything that is not in MAIN but is in AA I want put into DD
Add everything in DD to MAIN
Clear AA CC and DD

insert into CC select * from MAIN
delete C from CC c join AA a on a.ID = c.ID

insert into DD select * from AA
delete d from DD d join MAIN a on a.ID = d.ID

truncate table AA (etc)

 
 
 

1. really dumb question

This is probably a really stupid question but here goes. I
had created a shared date dimension with fiscal year,
quarter...etc. The lowest heirarchy level this dimension
had was calendar date which was formatted as 'mm/dd/yyyy'.
The data comes from Oracle and even though the default
date format Oracle uses is 'dd-mon-yyyy', AS always
displayed the data as 'mm/dd/yyyy' by default, which I
liked. Anyway, I recently upgraded SQL Server 2k and AS to
SP2 and reprocessed all of my cubes and dimensions earlier
this morning. For some reason SP2 must have changed the
default date format SQL Server 2k and AS use when
displaying dates. I now see all of my dates formatted
like '2001-02-04 00:00:00'.....which...I don't like. Nor
do my end users. Now for the dumb questions.....did SP2
make this modification? If so....why? and lastly....how do
I fix it so dates show up as 'mm/dd/yyyy'. I've tried
working with Convert() and can't seem to get it to work.

Thanks in advance.

Greg

2. DAO 3.6 connection using TCIP; how can I do this

3. Startup options - really dumb question

4. Checking memory in VFP program

5. Probably A really Dumb Question

6. Unsubscribe

7. Really Dumb Question...(Dumping db)

8. how do i persist a recordset(s)

9. really dumb question

10. Really dumb question

11. Really dumb question...

12. O.K. A really dumb question about primary, combination keys

13. Really dumb newbie question