Add Already Existing Taxonomy Column to Content Type using visual Studio

Hi
I need to add existing Taxonomy Site Column to my Content type, which will be used in  my SharePoint list Everywhere I have seen it is talking about how to create managed metadata column and then add it to your site content type.My column is already
present just I need to use it. How can I do this?
<ContentType
ID="0x0100b58d33764b384da58bbadee9721e1843"
Name="MyCustomContentType"
Group="Custom"
Description="Custom provisioned contenttype containing a Taxonomyfield"
Inherits="TRUE"
Version="0">
<FieldRefs>
<FieldRef ID="8D0458C1-0FB7-4981-BEE1-52D0DF01895C" Name="MyTaxonomyField"/>
<FieldRef ID="3a913424-fc7f-49ef-8fb6-a2ca1712cdc3" Name="MyTaxonomyFieldTaxHTField0"/>
<FieldRef ID="f3b0adf9-c1a2-4b02-920d-943fba4b3611" Name="TaxCatchAll"/>
<FieldRef ID="8f6b6dd8-9357-4019-8172-966fcd502ed2" Name="TaxCatchAllLabel"/>
</FieldRefs>
</ContentType>
Where I can get ID of existing Site Columns as well as TaxCatchAll and TaxCatchAlllabel

Hi,
To get the ID of existing site columns, you can use SharePoint Manager 2010:
Take a look at the post:
https://social.technet.microsoft.com/Forums/sharepoint/en-US/f95fb1e9-d9a9-48e8-b99e-4262bffa8968/sharepoint-manager-2010-how-to-update-list-schema-xml
Best Regards,
Lisa Chen
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected]

Similar Messages

  • Lookup column reference content type insteal of list

    i need to create look up column in SharePoint 201o using XML, my problem is i need the look up column to reference certain content type on the list instead of referencing the list itself, can we do that ????
    Mohamed Abdeen

    Hi,
    According to your post, my understanding is that you wanted to create a lookup column reference content type instead of list.
    Lookup Fields obtain their values from an existing list. Each Lookup Field is being linked to its list using the list's ID. As the ID's are being generated after creating the instances there is no way to provision a Lookup Field linked to a newly created
    list during Solution deployment.
    However, we can use the Feature Receivers to achieve it.
    Feature Receivers are nothing more than custom code you can attach to events triggered by a feature. Provisioning a custom field programmatically works exactly the same as doing it using the GUI: first you need to create a Site Column and then you need
    to attach it to the Content Type of your choice.
    Waldek Mastykarz had written a good blog about the lookup field reference content type, you can have a look at it.
    http://blog.mastykarz.nl/sharepoint-programmatically-provisioning-lookup-fields/
    Thanks,
    Jason
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Jason Guo
    TechNet Community Support

  • Unable to add books - "the document that you are attempting to add already exists in the library" - there is NOTHING in the liabrary. Any suggestions??

    I  just downloaded Digital Editions so I can read proceedings from a conference. I followed the instructions but cannot add the
    proceedings to ADE. The error message reads "Unable to add document xxx.epub. The document that you are attempting to
    add already exists in the library" There is nothing in the library, can't add the "Getting started" . e-book - same message. I did
    delete ADE and re-downloaded it. Is there anything else I can do? Any help would be appreciated. Thanks

    Get a new SIM from AT&T. They will replace it for free.

  • Deploying a Reusable Workflow to a List Content Type using PowerShell

    We have a situation where deployment of a reusable workflow for a site content type cannot be completed through the web interface due to the number of libraries where the content type is in use (time-out on deploy and update).
    It was hoped that this could be accomplished with PowerShell but the method of deploying to a list content type appears to be different than it is to a list (all content types).
    The below snippet works fine for a list / all content types:
    function AddWorkflowToLibraries ($SiteCollection, $ctName, $WfName, $WfAssociationName)
    $site = Get-SPSite $SiteCollection
    [Guid]$wfTemplateId = New-Object Guid
    #Step through each web in site collection
    $site | Get-SPWeb -limit all | ForEach-Object {
    $web = $_
    $_.Lists | ForEach-Object{
    if($_.AllowContentTypes -eq $true)
    if($_.ContentTypes.Item("$ctName") -ne $null)
    write-host "Enabling workflow on" $_.Title "in" $_.ParentWebUrl
    $ct = $_.ContentTypes[$ctName]
    $culture = New-Object System.Globalization.CultureInfo("en-US")
    $template = $site.RootWeb.WorkflowTemplates.GetTemplateByName($WfName, $culture)
    if($template -ne $null)
    $tasklist = "Tasks"
    $historylist = "Workflow History"
    if(!$web.Lists[$historylist])
    $web.Lists.Add($historylist, "A system library used to store workflow history information that is created in this site. It is created by the Publishing feature.",
    "WorkflowHistory", "00BFEA71-4EA5-48D4-A4AD-305CF7030140", 140, "100")
    if (!$web.Features["00BFEA71-4EA5-48D4-A4AD-305CF7030140"]) {
    Enable-SPFeature -Identity WorkflowHistoryList -Url $web.Url
    $wfHistory = $web.Lists[$historylist]
    $wfHistory.Hidden = $true
    $wfHistory.Update()
    if(!$web.Lists[$tasklist])
    $web.Lists.Add($tasklist, "This system library was created by the Publishing feature to store workflow tasks that are created in this site.", "WorkflowTasks", "00BFEA71-A83E-497E-9BA0-7A5C597D0107", 107, "100")
    $association = [Microsoft.SharePoint.Workflow.SPWorkflowAssociation]::CreateListAssociation($template, $wfName, $web.Lists[$tasklist], $web.Lists[$historylist])
    $association.AllowManual = $true
    $_.AddWorkflowAssociation($association)
    $_.Update()
    else
    Write-Error "Workflow Template not found"
    AddWorkflowToLibraries <Site Name> <Content Type Name> <Workflow Template Name> <Association Name>
    However changing the association as follows causes the script to still execute without a problem but the workflow doesn't appear for the content and the associations collection is empty:
    function AddWorkflowToLibraries ($SiteCollection, $ctName, $WfName, $WfAssociationName)
    $site = Get-SPSite $SiteCollection
    [Guid]$wfTemplateId = New-Object Guid
    #Step through each web in site collection
    $site | Get-SPWeb -limit all | ForEach-Object {
    $web = $_
    $_.Lists | ForEach-Object{
    if($_.AllowContentTypes -eq $true)
    if($_.ContentTypes.Item("$ctName") -ne $null)
    write-host "Enabling workflow on" $_.Title "in" $_.ParentWebUrl
    $ct = $_.ContentTypes[$ctName]
    $culture = New-Object System.Globalization.CultureInfo("en-US")
    $template = $site.RootWeb.WorkflowTemplates.GetTemplateByName($WfName, $culture)
    if($template -ne $null)
    $tasklist = "Tasks"
    $historylist = "Workflow History"
    if(!$web.Lists[$historylist])
    $web.Lists.Add($historylist, "A system library used to store workflow history information that is created in this site. It is created by the Publishing feature.",
    "WorkflowHistory", "00BFEA71-4EA5-48D4-A4AD-305CF7030140", 140, "100")
    if (!$web.Features["00BFEA71-4EA5-48D4-A4AD-305CF7030140"]) {
    Enable-SPFeature -Identity WorkflowHistoryList -Url $web.Url
    $wfHistory = $web.Lists[$historylist]
    $wfHistory.Hidden = $true
    $wfHistory.Update()
    if(!$web.Lists[$tasklist])
    $web.Lists.Add($tasklist, "This system library was created by the Publishing feature to store workflow tasks that are created in this site.", "WorkflowTasks", "00BFEA71-A83E-497E-9BA0-7A5C597D0107", 107, "100")
    $association = [Microsoft.SharePoint.Workflow.SPWorkflowAssociation]::CreateListContentTypeAssociation($template, $wfName, $web.Lists[$tasklist], $web.Lists[$historylist])
    $association.AllowManual = $true
    $_.ContentTypes[$ctname].AddWorkflowAssociation($association)
    $_.ContentTypes[$ctname].Update()
    else
    Write-Error "Workflow Template not found"
    AddWorkflowToLibraries <Site Name> <Content Type Name> <Workflow Template Name> <Association Name>
    The only change is:
    $association = [Microsoft.SharePoint.Workflow.SPWorkflowAssociation]::CreateListContentTypeAssociation($template, $wfName, $web.Lists[$tasklist], $web.Lists[$historylist])
    $association.AllowManual = $true
    $_.ContentTypes[$ctname].AddWorkflowAssociation($association)
    $_.ContentTypes[$ctname].Update()
    But unlike the list version, the association doesn't appear to be saved and no error is generated.
    Is anyone aware of what may cause this or have an example in C# that may explain something my script is missing?

    Hi Garry,
    After you associate the workflow to the content type, you should update the update the content type using
    $ct.UpdateWorkflowAssociationsOnChildren($true,$true,$true,$false)
     method.
    Here is the completed script:
    [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
    $site=Get-SPSite "http://serverName"
    $web=$site.OpenWeb()
    $list=$web.Lists["ListC"]
    $taskList=$web.Lists["Tasks"]
    $historyList=$web.Lists["Workflow History"]
    $ct=$list.ContentTypes["Link"]
    $culture=New-Object System.Globalization.CultureInfo("en-US")
    $wfTemplate=$web.WorkflowTemplates.GetTemplateByName("Three-State",$culture)
    $associationWF=[Microsoft.SharePoint.Workflow.SPWorkflowAssociation]::CreateListContentTypeAssociation($wfTemplate, "myThreeStateWF",$taskList,$historyList)
    $ct.WorkflowAssociations.Add($associationWF)
    $ct.UpdateWorkflowAssociationsOnChildren($true,$true,$true,$false)
    Here is a demo about how to update it using C#
    http://www.thorntontechnical.com/tech/sharepoint/sharepoint-2010-associate-workflow-to-content-type-in-a-feature
    Wayne Fan
    TechNet Community Support

  • How to retrieve the content type used in a document library (C# - Client Model).

    Hello,
    I need to know if it's possible to retrieve the content type used in a document library, so I can know the columns active and used in this document library. I am using the Client Model in C#.
    Thanks

    First, retrieve your document library as a List object. Then, use the
    List.ContentTypes property to iterate through all the content types assigned to the list.
    Blog:
    blog.beckybertram.com |
    RSS | @beckybertram |
    SharePoint 2010: Six-in-One

  • Why the system create HU that already exists  in table VEKP when I use BAPI_HU_CREATE?

    Hi All,
    When I use the BAPI_HU_CREATE  to create HU, the system give me a HU and it inserts a line in Table VEKP, however when I search in table VEKP  with field HU EXIDV, I find  two entries with the same HU, one of them has VPOBJ 01 and the other has VPOBJ 12, So when I execute  transaction LM46  the system shows “The system could not find transfer order for execution” because the system search in table VEKP it find the first line with VPOBJKEY = delivery  and STATUS = 0020, however those delivery is not assigned to transfer order that I want to confirm transfer order.
    Why the system create HU that already exists  in table VEKP when I use BAPI_HU_CREATE?
    Thank you!
    Best regards

    Do you want to say that you got 2 HU from BAPI_HU_CREATE?
    I think you only got the one which has VPOBJ = 12 Non-Assigned Handling Unit
    which is exact what the BAPI is used for, see the docu in SE37. Didn't you yourself add this EXIDV in the IDoc?
    VPOBJ = 01 Outbound Delivery
    If you want to pack the Outbound delivery then you should use BAPI_HU_PACK.

  • External Content Type Using SQL

    I’m trying to setup an external content type using just SharePoint designer. 
    I will need to be able to show other individual within the organization how to create these content types so getting it to work with just SharePoint designer is the goal. 
    No Programming involved please.
    Abbreviated Steps I have taken
    The account that we will use to connect to 2012 SQL server has been created and the correct permissions have been granted to the database.
    The secure store service account has been created and setup
    Go into SharePoint designer 2010 to create the external content type using
    Impersonated Custom Identity and inputting in the username and password that was setup in SQL server and added to the secure store credentials for the secure store service. I receive error cannot login with the provided credentials.
    I have searched the web trying to correct this issue and cannot find anything that will assist. 
    Everything either shows you to connect with windows identity (not an option) or breezes past this issue.

    To connect as an impersonated custom identity you have to:
    1. Be sure SQL login on SQL Server uses SQL authentication
    (not Windows one!)
    2. Create target application in Secure Store with:
      a. Target app type - "Group"
      b. Field types - Username and
    Password
    3. Don't forget to grant required permission to a new Traget Application.
    Here is a good guide (look at steps 4-8):
    http://lightningtools.com/bcs_meta_man/sharepoint-2010-secure-store-service-and-oracle/

  • Create BCS External Content Type or a list based on a WCF Web Service using Visual Studio

    Hi ,
    How to create a BCS External Content Type or a list Based on a WCF Web Service using Visual Studio.
    The link provided here shows the requirement through Designer. http://msdn.microsoft.com/en-us/library/office/ee556431(v=office.14).aspx but I want this to be through VS code..
    Please help ..Appreciate your help..
    Thanks,
    Satheesh

    HI Sateeshlt,
    You can see the below link also;
    http://www.fabiangwilliams.com/2013/10/14/part-2-of-3-blog-update-on-sharepoint-bcs-with-full-crud/
    Best Regards,
    Brij K

  • Adding Columns to the matrix in SAP B1 user form using Visual studio 2010

    Hi,
    Using Visual studio 2010, I have created a SAP B1 user form( b1f ) with one matrix.Matrix is having 5 columns. Its working properly. Later, I want to add few more columns. Then I added columns to the matrix as I have created columns initially. But, it does not saves.
    i.e, Whenever I run, In B1 I could see only old columns. Newly created columns are not showing.So, I closed the .net project and opened again. Created columns are not showing in visual studio b1f itself. So, I created again and saved. But, its not saving.I tried it many times.
    What I am missing?
    Any help is appreciated.
    Thanks in advance,
    Parvatha Solai.N

    Hi Parvatha,
    Are you using B1 Studio? Anyway try to clean the solution first then rebuild it. This would re-copy files to the output directory, that contain your changes.
    Best regards,
    Pedro Magueija

  • I need to add a new report to the application that is done using visual studio and SSRS and SQL Server 2008

    I have an application that is done using SSRS on visual studio and it connects to the report server on SQL server 2008 environment.
    I've been changing the existing reports using visual studio 2008 and modifying the reports on the report server. How do I add a new report to the application ? I created a new report and deployed it on the report server but it didn't show up in the application.
    I can access the application source code on visual studio 2010 and TFS (Team Foundation). Thanks. 

    Hi,
    I have a question. This application retrieves SSRS reports from the report sever. When I download the reports
    from the SQL Server I can open them in visual studio 2008 but they don't open in visual studio 2010. I can access the application files on visual studio 2010 and team foundation server 2010. I was unable to open team foundation server 2008 on visual studio
    2008. The issue is that I am unable to add a report with a new name to the application. I use visual studio 2008 to deploy the reports on the report server but it has to be the same name to be able to run the report from the application. I can deploy any report
    on the report server but I can't access it from the application unless it has to be the same name as the present reports. If I keep the report the same name then it will replace the old report and the new report will run from the application. But only if it's
     the same name. I guess when I add a new report to the application with a new name I am supposed to add a definition in the application C sharp files  on visual studio 2010 so that the new report will show in the application. What's your opinion
    ? I have attached 2 images of the application and team foundation server 2010 and the report server.
    Thanks. 

  • Add new link on Quick Launch using visual studio

    Hi,
    How can I add new link on quick launch using visual studio?
    I saw many link about developing quick launch or top link bar.
    But they are using visual webpart to develop this function and can add
    when the user add this webpart. How can I add automatically when I deploy the project.
    Thanks in advance!
    Best Regards, wendy

    using System;
    using System.Web.UI;
    using System.Linq;
    using Microsoft.SharePoint;
    using Microsoft.SharePoint.Navigation;
    namespace SPQuickLaunchAddItemWebPart.VisualWebPart1
    public partial class VisualWebPart1UserControl : UserControl
    protected void Page_Load(object sender, EventArgs e)
    CleanUpQuickLaunch(“My Header”);
    AddQuickLaunchItem(“My Header”, “http://www.google.com/q=stuff”, “My Link Here”, “http://www.google.com”);
    CleanUpTopNavigationBar(“My Header”);
    AddTopNavigationBarItem(“My Header”, “http://www.google.com/q=stuff”, “My Link Here”, “http://www.google.com”);
    AddTopNavigationBarItem(“My Header”, “http://www.google.com/q=stuff”, “My Link Here1″, “http://www.google.com”);
    public static void CleanUpQuickLaunch(string header)
    using (SPSite site = SPContext.Current.Site)
    using (SPWeb web = site.OpenWeb())
    web.AllowUnsafeUpdates = true;
    SPNavigationNodeCollection quickLaunch = web.Navigation.QuickLaunch;
    // try to get quick launch header
    SPNavigationNode nodeHeader = quickLaunch.Cast<SPNavigationNode>().Where(n => n.Title == header).FirstOrDefault();
    //if header not found remove it
    if (nodeHeader != null)
    quickLaunch.Delete(nodeHeader);
    public static void CleanUpTopNavigationBar(string header)
    using (SPSite site = SPContext.Current.Site)
    using (SPWeb web = site.OpenWeb())
    web.AllowUnsafeUpdates = true;
    SPNavigationNodeCollection topNavigation = web.Navigation.TopNavigationBar;
    // try to get quick launch header
    SPNavigationNode nodeHeader = topNavigation.Cast<SPNavigationNode>().Where(n => n.Title == header).FirstOrDefault();
    //if header not found remove it
    if (nodeHeader != null)
    topNavigation.Delete(nodeHeader);
    public static void AddQuickLaunchItem(string header, string headerURL, string item, string url)
    using (SPSite site = SPContext.Current.Site)
    using (SPWeb web = site.OpenWeb())
    web.AllowUnsafeUpdates = true;
    SPNavigationNodeCollection quickLaunch = web.Navigation.QuickLaunch;
    // try to get quick launch header
    SPNavigationNode nodeHeader = quickLaunch.Cast<SPNavigationNode>().Where(n => n.Title == header).FirstOrDefault();
    //if header not found create it
    if (nodeHeader == null)
    nodeHeader = quickLaunch.AddAsFirst(new SPNavigationNode(header, headerURL, true));
    nodeHeader.Update();
    //try to get node item under header
    SPNavigationNode nodeItem = nodeHeader.Children.Cast<SPNavigationNode>().Where(n => n.Title == item).FirstOrDefault();
    //If item not found under heading then create it
    if (nodeItem == null)
    nodeItem = nodeHeader.Children.AddAsLast(new SPNavigationNode(item, url, true));
    else
    nodeItem.Url = url;
    nodeItem.Update();
    nodeHeader.Update();
    public static void AddTopNavigationBarItem(string header, string headerURL, string item, string url)
    using (SPSite site = SPContext.Current.Site)
    using (SPWeb web = site.OpenWeb())
    web.AllowUnsafeUpdates = true;
    SPNavigationNodeCollection topNavBar = web.Navigation.TopNavigationBar;
    // try to get quick launch header
    SPNavigationNode nodeHeader = topNavBar.Cast<SPNavigationNode>().Where(n => n.Title == header).FirstOrDefault();
    //if header not found create it
    if (nodeHeader == null)
    nodeHeader = topNavBar.AddAsFirst(new SPNavigationNode(header, headerURL, true));
    nodeHeader.Update();
    //try to get node item under header
    SPNavigationNode nodeItem = nodeHeader.Children.Cast<SPNavigationNode>().Where(n => n.Title == item).FirstOrDefault();
    //If item not found under heading then create it
    if (nodeItem == null)
    nodeItem = nodeHeader.Children.AddAsLast(new SPNavigationNode(item, url, true));
    else
    nodeItem.Url = url;
    nodeItem.Update();
    nodeHeader.Update();
    above code demonstrate how to add node inside the quick launch and top navigation.
    you can also follow the below link.
    http://myspexp.com/2012/04/30/adding-items-to-your-quick-launch-or-top-navigation-programmatically/
    Hiren Patel | Please click "Propose As Answer" if this post solves your problem or "Vote As Helpful" if this post has been useful to you.

  • Look up column in Content Type Hub

    Hi,
     Would like to know whether look up columns are  supported /not supported in content type hub.
     Currently I am having few columns in my doc.libs which uses look up column and i want to implement content type hub.
    heard that this is a limitation in CTH.
    Can anyone from MS pls confirm.
     and at the same  time if I want to use the look up column functionality and implement CTH, any alternatives available.
    help is  highly appreciated!

    Hi,
    Please refer to the following article, it might help
    Content Type Hub Sync & Lookup lists
    And also refer to the following post.
    Content Type Hub Syndication and lookup site column within a content type
    Please mark it answered, if your problem resolved.

  • How to set RelationshipDeleteBehavior on a list using a site column and content type programatically CSOM c#

    On Prem development machine, I'm writng a deployment routine in c# using the client object model.  I've created some site columns of type Lookup, I've created a content type and added those lookup columns to it and I've created a list using the
    content type.  I want to set the RelationshipDeleteBehavior property on some of the lookup columns in the list.  I'm also using the 16 assemblies.
    List list = cc.Web.GetListByTitle("MyList");
    cc.Load(list);
    cc.ExecuteQuery();
    Field f = list.Fields.GetByInternalNameOrTitle("MyLookupField");
    cc.Load(f);
    cc.ExecuteQuery();
    (f
    as
    FieldLookup).RelationshipDeleteBehavior =
    RelationshipDeleteBehaviorType.Restrict;
    f is returning as a Field but (f
    as
    FieldLookup) is returning null here.  Any insight on this?
    Thank you.
    Dan Budimir

    Hi,
    We can use SP.ClientContext.castTo method to convert the field to lookup field . The following code snippet for your reference:
    ClientContext context = new ClientContext("http://siteurl");
    NetworkCredential credentials = new NetworkCredential("username", "password", "domain");
    context.Credentials = credentials;
    Web web = context.Web;
    List list = web.Lists.GetByTitle("MyList");
    Field field = list.Fields.GetByInternalNameOrTitle("MyLookupField");
    FieldLookup lookupField = context.CastTo<FieldLookup>(field);
    lookupField.RelationshipDeleteBehavior = RelationshipDeleteBehaviorType.Restrict;
    lookupField.Indexed = true;
    lookupField.Update();
    context.ExecuteQuery();
    Thanks,
    Dennis Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Dennis Guo
    TechNet Community Support

  • Trying to un-hide content type using powershell

    I'm using this script below and am writing back the library name and if the content type is hidden after the update.
    Everything points to being correct yet when I go back to the library settings the eDocument Link is still hidden. What am I missing?
    add-pssnapin microsoft.sharepoint.powershell -ErrorAction SilentlyContinue
    $script:WebApps = Get-SPWebApplication "http://xxxx"
    $script:DocLibType = [Microsoft.SharePoint.SPBaseType]::DocumentLibrary
    foreach ($WebApp in $WebApps)
    foreach ($site in $WebApp.Sites)
    if ($site.AllWebs.Count -gt 0)
    foreach ($web in $site.AllWebs)
    foreach ($list in $web.GetListsOfType($DocLibType))
    foreach ($ct in $list.ContentTypes)
    if ($ct.Name.Equals("eDocument Link"))
    $ct.Hidden=$false;
    $ct.Update();
    $List.Update()
    Write-host "$site:: $web:: $List updated"
    Write-host $ct.Hidden
    $web.Dispose()
    $site.Dispose()
    SPSite Url=http://xxxx/team/is:: xxxx:: Active updated
    False
    SPSite Url=http://xxxx/team/is:: xxxx:: Documents updated
    False

    that's what you already checked in your loop 
    if ($ct.Name.Equals("Wibble"))
    the updated is because you already added the new content type at the start of the new item menu so this will make sure that you will add it to the end and ignore the first entry as if you add list contains duplicate content type you will get exception at
    the line 
    $list.RootFolder.UniqueContentTypeOrder=$ct_list
    Hope that helps|Amr Fouad|MCTS,MCPD sharePoint 2010

  • How do I add more than one column to a table using SQL?

    Hi
    I need to add 3 columns to a table using SQL
    the syntax
    "ALTER TABLE TEST ADD COLUMN newcol1 float";
    works fine - for adding one coumn only.
    For multiple columns I tried various permutations along the lines of
    "ALTER TABLE TEST ADD (COLUMN newcol01 float, COLUMN new2 float,COLUMN new3 float)";
    "ALTER TABLE TIPSTEST ADD COLUMN new1 float"
    "ALTER TABLE TIPSTEST ADD COLUMN new2 float"
    "ALTER TABLE TIPSTEST ADD COLUMN new3 float"
    etc., but this doesn't work.
    From a web search it sounds like SQL can only add one column at a time.
    I have a workaround : create intermediate temporary tables , copying data and adding
    one column at each stage. It seems a fairly awkward way of programming though.
    Am I missing something simple : is there a way to add multiple columns in one go?
    Thanks

    OK : solved an underlying problem with this one myself
    for the code
    String createString;
    createString =  "select COFFEES.* INTO NEWCOFFEES FROM COFFEES"; // example
              Statement stmt;
              try {
                   stmt = a_Globals.database1Connection.createStatement();
                          stmt.executeUpdate(createString);
                   stmt.close();
                   a_Globals.database1Connection.close();
              } catch(SQLException ex) {
                   System.err.println("SQLException: " + ex.getMessage());
              }                    commenting out the line:
    a_Globals.database1Connection.close();
    Allowed the subsequent SQL statement(s) to work OK. Looks like this was the cause of several
    difficulties, preventing me doing several SQL instructions in turn.
    Thanks for the responses.
    Mike2z

Maybe you are looking for

  • Unable to Create Requestor ABCS using AIA Constructor in Jdev 11.1.1.2

    Hi Gurus, I'm currently trying to create ABCS Requester with J developer 11.1.1.2 using the AIA Service Constructor. The Composite Application shows the BPEL Component and the target services under the Composite screen.When we click on the BPEL Compo

  • Change cost center in migo

    Hi all! I would like to know if it is possible to chage the cost center that was set in the purchase order in the migo transaction. Becuase the view I get from the cost center field is the not changeable view. Thanks

  • Enhancements to Forms

    We use HCM F&P and everything works well in the Production system. We plan to make some enhancements to the Form like 1) Changes in Layout, 2) New Fields, 3) Changes in Workflow routing We plan to introduce new container variables which will change w

  • Error 32812 (Specified Tag Name not Defined) from FP Read

    I built an application using LabVIEW 7.1 and FieldPoint 4.1.  It performed well until about a week ago.  Suddenly, I started getting error 32812 (Specified Tag Name Not Defined) when doing an FP Read to read all the channels on an FP-RLY-420.  This i

  • [FLASH MX 2004] Validar una fecha en AS

    Buenos días, Como puedo validar si una fecha que me han metido en un formulario hecho en AS es correcta? Muchas gracias por la ayuda. Saludos