codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Help me  Archive Import (FARKHAN) at 07:59 on Sunday, June 29, 2003
 

I have problem in my database,
I hope to everybody to help me solve from my problem. Advice me !
In databse :
- I Have 2 tables that each value in field can be talked the same.

Table I | Table II
(P.key) -field Date = 12/05/03 | -field date = 12/05/03
(P.key) -field Time = 08:00 am | -field Time = 18:00 pm
(P.key) -field No.ID = 98470012 | -field No.ID = 98470012
-field Trans = C (come) | -field Trans = G (gohome)

In my case :
- I want to find value in field trans that in table I there is but in table II there aren`t or converse.

How am I find it ?, thank`s before.

  Re: Help me  Troy Wolf at 17:01 on Tuesday, July 15, 2003
 

I THINK I know what you are asking. You want to select all records in table 1 where the trans ID is NOT in table 2. Right? If so:

select *
from table1
where ID not in (select ID from table2)

Without knowing your application, this seems like a strange table architecture. Perhaps you`d be better off with one table like so:

TransID (BIGINT - Primary Key IDENTITY)
ComeDate (DATETIME)
GoHomeDate (DATETIME)

This assumes that you first create the record when the "come" happens. So ComeDate would also serve as your original "transaction timestamp". My point is, analyze your table structure, you may find that you are better off with ONE table instead of the two.

Troy Wolf: site expert
SnippetEdit Website Editor


  Thank U  Archive Import (Farkhan) at 03:03 on Wednesday, July 16, 2003
 

Thank 4 ur advice, let`s me try.

  Re: Help me  Elain at 07:25 on Wednesday, November 17, 2010
 

Did you solve the problom? I also met the same question, i really wanted to get the answer!
-----------------------------------------------
flash menu|drop down menu|flash decompiler mac











CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Re: hi
•  Re: Questions about Bill Gates
•  Re: How to convert a big XML to HTML using XSL?
•  Re: Assign a html table element to a variable
•  Re: Form Field Validation
•  Re: Form Email script
•  Re: File Formats
•  Re: Cannot Input data to Database Access
•  Re: Help me


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2010