Sql Compact 3.1 Update issue. Updating one table from anther

Discussion in 'microsoft.public.sqlserver.ce' started by JohnNorth, Jan 28, 2009.

  1. JohnNorth

    JohnNorth Guest

    Hi.
    I'm using SQL Compact 3.1 I think. Vs 2005 says the version is 3.00.000 and
    the reference I'm using for System.Data.SqlServerCe is 3.0.3600.0

    Anyway, I can't get Server explorer to execute a query which updates one
    table from another. I get the following error message "There was in error
    parsing the query, Token in error is from."

    I’ve setup two simple tables to test this:-

    Table1
    ID int Indentity
    Name nvarchar (20)
    Telephone nvarchar(10)

    Table2
    ID int Indentity
    Name nvarchar (20)
    Telephone nvarchar(10)
    Flag nvarchar(1)

    The query I’ve used:-

    update Table1
    set Telephone = TB2.Telephone
    from Table2 TB2
    where Table1.name = TB2.Name and TB2.Flag='C'

    Can Sql compact3.1 update Fields from one table from fields from another ?
     
    JohnNorth, Jan 28, 2009
    #1
    1. Advertisements

  2. Alberto Silva - Microsoft MVP - Device Application, Jan 29, 2009
    #2
    1. Advertisements

  3. JohnNorth

    matware Guest

    Which raises the question, 'how do you get there from here?'
    Is there any way, using only SQL to update one table from another?
     
    matware, Mar 6, 2009
    #3
  4. Alberto Silva - Microsoft MVP - Device Application, Mar 8, 2009
    #4
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.