Try this:

UPDATE PhotoLog SET Photographer = T1.PhotogName from Photog T1, PhotoLog 
T2 WHERE T2.Photographer IS NULL AND T2.PhotogInitials = T1.PhotogInitials

Dawn Hast
Dairpak Business Systems Group
Blue Ridge Paper Products, Inc.



"Richard  Croy" <[EMAIL PROTECTED]> wrote on 02/15/2008 04:24:20 PM:

> I'm stumped at what I'm doing wrong.
> 
> This is the list of columns (so far) in a new database I'm creating 
> for a project 
> 
> R>lis col
>  Column Name        Table Name         Attributes
>  ------------------ ------------------ 
---------------------------------------
>  CDRom              PhotoLog           Type   : INTEGER  
>  PhotoFile          PhotoLog           Type   : TEXT 30  
>  PhotogInitials     Photog             Type   : TEXT 4  
>                     PhotoLog           Type   : TEXT 4  
>  PhotogName         Photog             Type   : TEXT 25  
>  Photographer       PhotoLog           Type   : TEXT 25  
>  SendWhere          DoOutput           Type   : TEXT 8  
>  X                  FormTable          Type   : TEXT 1  
> 
> This is what I want to do. When I import a list of file names of 
> photo files from a CD-ROM, I need to update the record to include 
> the photographer's initials and name. I have tried to use this command 
> 
> R>UPDATE PhotoLog SET Photographer = PhotogName in Photog WHERE 
> PhotogInitials =         PhotogInitials WHERE Photographer IS NULL 
> 
> [The Where command is necessary because the new file names are being
> appended to the existing list so I want to make sure that the update
> is only on the new rows because they don't have that information.]
> 
> Every time I run this command, this is the error I get.
> 
> -ERROR- Column Photographer must be a valid TEXT. ( 122)
> 
> The Photographer column IS defined as TEXT 25
> 
> When I run that same command substituting the real name for 
> PhotogName and the real initials for PhotogInitials, it works.
> 
> Thanks for getting me straightened out!
> Richard S. Croy
> [EMAIL PROTECTED]
> 
> ====================================
> This message has been checked with an up-to-date 
> version of Norton Antivirus before sending,
> ====================================

Reply via email to