Re: Syntax help requested for update query

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Van T. Dinh (VanThien.Dinh_at_discussions.microsoft.com)
Date: 08/17/04


Date: Mon, 16 Aug 2004 21:28:36 -0700

Same results when I tested in A2K2. This is consistent
with Null Value for B when C is updated. If instead of B,
use B & "" in your 2 expressions to update C, the results
also show that the Null value was used for B.

Cheer
Van T. Dinh

>-----Original Message-----
>Interesting -
> because I can't get it to work as a single query in
Access 2000.
>Are you perhaps using a different version?
>Or running these updates as separate queries?
>
>I have 3 text fields, A, B, and C
>If I use SQL like this:
>UPDATE MyTable Set B= Left(A,Instr(A,"-")-1), C=Len(B)
> my C column remains empty after the query is executed.
>If I use SQL like this:
>UPDATE MyTable Set B= Left(A,Instr(A,"-")-1), C=Mid(A,Len
(B)+1)
> I get a type conversion error on every row.
>
>What do you think?
> - Turtle
>



Relevant Pages

  • Re: Extracting SQL into resourceStrings...Tool?
    ... ROFL->LMAO:) It's hard enough getting a small team to be consistent ... want the injected SQL OUT of the source files like this. ... work you might want to read a 3-part series of articles in Delphi Informant ... resource strings because having the sql in the db itself makes easier to ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: Tracing
    ... When tracing SQL statements from SQLPLUS to see consistent gets and ... such, if the query contains bind variables or constants, how do you ... Here is the general procedure with a different SQL statement (you MUST ... Autotrace and EXPLAIN PLAN will sometimes lie about the actual ...
    (comp.databases.oracle.misc)
  • How to rebuild SQL connection
    ... must request a single query from a SQL 2000 box. ... The problem is that the SQL ... written the entire connect-query-answer-disconnect into a single function to ... The outage is almost never more then 5 minutes. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Generating SQL
    ... >> other code change, just the class definition. ... > Concatentation is not by itself less consistent. ... >> proper SQL, with parameters and data types derived from my classes. ...
    (comp.object)
  • Re: Access 2003 - SQL Server - Records apparently delete but dont
    ... as you have noticed are not consistent ... And there have been arguments for and against using ADO. ... results using ADO between Access and Sql Server. ...
    (comp.databases.ms-access)