navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

Database help

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> Database help
Page: [1]
 
WIryeman

 

Posts: 14
Joined: 2/27/2003
Status: offline

 
Database help - 2/28/2003 10:16:13   
This is an example of the tables I have now.
ID          N1
20Orange    Log
40Green	    Bog
50Blue      Dog
60Red       Logg
75Yellow    Frog


Table2
ID            PID     P
20Orange               Bog
40Green                Log
50Blue                 Logg
60Red                  Frog
75Yellow               Bog

I am having a trouble updating a database I created, above. The original has 1075 records and 10 different PID and P columns so manual updating is unwanted. Below is an example of the Database end result I wish to have.



ID	      N1
20Orange    Log
40Green     Bog
50Blue      Dog
60Red       Logg
75Yellow    Frog

Table2
ID	    PID	       P
20Orange    40Green    Bog
40Green	    20Orange   Log
50Blue      60Red      Logg
60Red	    75Yellow   Frog
75Yellow    40Green    Bog


I have tried update queries and Iif statements in the database but it keeps pulling in the ID field so ID and PID are the same. Not the result I want. Help!
bobby

 

Posts: 11394
Joined: 8/15/1969
From: Seattle WA USA
Status: offline

 
RE: Database help - 2/28/2003 10:58:24   
Welcome to the forums!

Can you post your update code so we can take a closer look?

_____________________________

If con is the opposite of pro, is Congress the opposite of progress?


:)

(in reply to WIryeman)
WIryeman

 

Posts: 14
Joined: 2/27/2003
Status: offline

 
RE: Database help - 2/28/2003 11:41:45   
UPDATE tbl1 INNER JOIN tbl2 ON (tbl1.ID = tbl2.PID) AND (tbl1.ID = tbl2.ID) SET tbl2.PID = [tbl1]![ID]
WHERE (((tbl2.PID)=IIf([tbl2]![P]=[tbl1]![N1],[tbl1]![ID]," NA" )));

This is what I tried last, and in this case it cameback emtpy.

_____________________________

May Your Boots Dry Quickly

(in reply to WIryeman)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> Database help
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts