Chip,

My initial observations are:
* I think [ ] around the table name are not required (that's not part of the 
SQL standard)
* it would seem that 4D's implementation of Alter table doesn't support "rename"

Regards,
 
Narinder Chandi,
ToolBox Systems Ltd.
-- 

-----Original Message-----
From: 4D_Tech <[email protected]> on behalf of 4D Tech Mailing List 
<[email protected]>
Reply-To: 4D Tech Mailing List <[email protected]>
Date: Friday, 26 July 2019 at 19:30
To: 4D Tech Mailing List <[email protected]>
Cc: Chip Scheide <[email protected]>
Subject: SQL - renaming a field

    I'm trying to use SQL to rename an existing field
    $Sql:="Alter table ["+$Table_Name+"] Rename "+"Unused"+" to 
    "+$Field_Name+";"
    
    When executed I get a parsing error at 'Rename'.
    
    can someone better versed either correct my above syntax, or point out 
    a way to rename an existing field using SQL, -- preferably without 
    dropping and then adding.
    
    Thanks
    Chip
    
    ---------------
    Gas is for washing parts
    Alcohol is for drinkin'
    Nitromethane is for racing 
    **********************************************************************
    4D Internet Users Group (4D iNUG)
    Archive:  http://lists.4d.com/archives.html
    Options: https://lists.4d.com/mailman/options/4d_tech
    Unsub:  mailto:[email protected]
    **********************************************************************


**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to