Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by jeninco

  1. jeninco

    Update table with record from another table

    To any who are interested.... I finally got a statment to work, but I had to update the entire file. A consultant believes we have a defect in SQL/400 because both of these updates should have worked, but only one did. FAILED: update f4106 BP1 set bplitm = (select IM1.imlitm from f4101 IM1...
  2. jeninco

    Update table with record from another table

    Ahhhhh!!!! I only have one record in the F4101 file (your f101) but in some instances may have multiple records in the F4106 file (your f104). Because of that relationship does this mean I can't do this update or we just have to be more creative?? (I tried the update anyway, and it ran for...
  3. jeninco

    Update table with record from another table

    I tried: update f4106 set f4106.bplitm=f4101.imlitm from f4101 where f4106.bpitm = F4101.imitm and f4106.bplitm <> F4101.imlitm and got: Token . was not valid. Valid tokens: =. Then I tried: update f4106 set bplitm=imlitm from f4101 where f4106.bpitm =...
  4. jeninco

    Update table with record from another table

    The WHERE statement in line 4 gave me a syntax error. &quot;Token , was not valid. Valid tokens: < + ) - > = <> <= ¬< ¬> ¬= >= IN&quot; I removed one of the qualifiers in line 4 and 5. 4. WHERE (f4106.bplitm) not in 5. (SELECT imlitm from f4101) The update ran and said &quot;Null values are...
  5. jeninco

    Update table with record from another table

    Can someone to help me with the &quot;order of operations&quot; with this statment. I finally got an update to work, kinda. The update ran, and said &quot;Row not found for update.&quot; I need help knowing which statements are being looked at first, so I can figure out which row it can't...
  6. jeninco

    Update table with record from another table

    I tried it and I got a syntax error: &quot; Keyword FROM not expected. Valid tokens: SET.&quot; I took out the &quot;FROM&quot; statement and replaced it with &quot;Set bplitm=f4101.imlitm&quot; and got the original error &quot;Column qualifier or table F4101 undefined.&quot; Still looking for...
  7. jeninco

    Update table with record from another table

    Well, it acted like it was going to work, but then I got a &quot;Null values are not allowed in column bplitm in table F4106.&quot; It went on to say: &quot; If this is an UPDATE statement then the null value was specified in the relative entry 1 in the SET clause. The null value was specified...
  8. jeninco

    Update table with record from another table

    Oops! That was my typo. I do have the parenthsis there. What's puzzling, is if I set my last where statement to: Where f4106.bpitm = 1247 it works. But I don't want to have to do this update one record at a time!!!
  9. jeninco

    Update table with record from another table

    I've seen suggestions for variations of this request, but when I tried them, it ignored my data selection and indicated it was going to update the entire file, which is NOT ok. (I only want to update the records that don't already match.) What I tried is: update f4106 set bplitm = select (imlitm...

Part and Inventory Search

Back
Top