Change All Field Names in a Table to have a Lowercase First Letter

I have an SQL database with many tables.  All of the field names in each table start with an Uppercase letter. I would like to programmatically change all of the field names in each table to start with a lowercase letter.  Can this be done?
E.g.:  "FieldName" to "fieldname"
Thanks.

O.K.  Just in case anyone else runs into this, I used Carl's answer to guide me in the right direction. This is my final code that created the commands I needed to run a batch (where TMaster is my schema name and the WHERE statement contains
the datatypes in your tables):
SELECT
'EXEC SP_RENAME ''TMaster.'+TABLE_NAME+'.'+COLUMN_NAME+''',
'''+LOWER(SUBSTRING(COLUMN_NAME,1,1))+SUBSTRING(COLUMN_NAME,2,255) 
+''',
''COLUMN'''
FROMINFORMATION_SCHEMA.COLUMNS
WHEREDATA_TYPE='int'.

Similar Messages

  • How to return all field names in a table

    How do you write a report to return all field names in a table? I prefer the field names in a column.
    Thanks
    Wayne

    Hi,
    In Oracle it is,
    Select column_name from user_tab_cols where table_name  = 'Table_Name';
    Note: Table_Name should be in capital letters
    In MS SQL Server it is,
    SELECT Column_Name + ', '
    FROM INFORMATION_SCHEMA.COLUMNS
    WHERE TABLE_NAME = 'Table_Name'
    Hope this helps!
    Thanks
    -Azhar

  • How to get the field names of a table

    hi all,
    i need to get all field names of a table. here i dont need any data. i need only field names.
    initially i used this query, select * from tname;
    the problem is if table have 1000 records, all records will be in memory.
    how to get this one.
    regards
    pavan.

    hi all,
    thanks a lot. the query is working.
    initially i given this query
    select column_name from user_tab_columns where table_name='mytable';
    but no rows selected.
    and i tried with this,
    select column_name from user_tab_columns where table_name='MYTABLE';
    this is working fine.
    thanks
    pavan.

  • Change of field Name

    I am having 20 fields in a table and in this table i am having about sis lakhs record. Now i realised that one of the field name is spelt wrongly.I am using oracle 8i now without doing anything to the table i must have to change the field name,
    Foe example the wrong field is martialstatus and it should be corrected to maritalstatus.
    If any body having any answers can reply to this mailid [email protected]

    Suresh,
    You have 6 hundred thousand records in a table, You are lucky with 8i this is no problem,
    You can solve this in two ways,
    1. Create a new table with correct field name and then insert all record into the new table.
    2. Create the new field with correct name in
    the same table and then copy the data from the old field into new field and then use the DROP COLUM command and drop the old field.
    Good Luck
    Nisar Tareen.
    Canada.
    null

  • Script : how to change the Field name in standard program(ZM_MEDRUCK)

    Hi Experts,
    I am working with SAP SCRIPT. i need to change the Field Name that is PO NO to Document No & PO DATE to Document Date.
    These are assigned in data declaration as gv_name and gv_date.
    Can anyone help me to change this Fields.
    Regards,
    Vijayan.R

    Hi,
    You can archive this by making change in SAP script only. You don't need to touch the standard prgm.
    Debug the script and find it out which fields (In script editor) are printing these text on layout... then just replace them by creating your own text...
    You can create a text in TTDTG table,, like ZZPO_NAME = ( Document Name),, and use this filed in the script editor.
    &ZZPO_NAME&

  • How to change the field name in SUS

    HI,
    In the section view all PO's, I want to change the field name  <b>document number</b> to <b>invoice number</b>.Please do let me know how to go about it.
    Thanks in advance ,
    Manu

    Hi,
    The text ID should be first identified in the BSP (BBP_SUS_UI/DOC_NUMBER?)
    Next execute SOTR_EDIT and use the FInd button. Enter the package of the BSP object (BBP_SUS_U?) and select the language as English. Execute the program and you will a complete list of text used in SUS screen. Locate the text ID as above and double click to change based on what you need.
    Regards.

  • How to change the field name

    I want to change the field name in Oracle schema
    Can I do ir?
    If yes, please tell me how to type the SQL
    Thanks

    Use ALTTAB command of my freeware SQLPlusPlus to ALTER a table anyway you like including inserting columns within the middle of the table.
    regards,
    M. Armaghan Saqib
    SQL PlusPlus - Add power to command line of SQL Plus
    SQL Link for XL - Integrate Oracle with XL
    Download free: http://www.geocities.com/armaghan/
    null

  • E-recruiting: Requisition management - Possible to change the field names??

    Hi to all e-recruiting experts,
    Need some assistance pertaining to the requisition management portion in e-recruiting.
    We have showed the standard SAP E-recruiting requisition bsp pages to our client and they have requested changes to the field names as they feel that the standard names are not intuitive enough.
    For instance,
    The field - "Hierarchy Level" - They have requested to change to "Job Grade"
    and the field "Functional Area"  to "Type of Work".
    Is there any way that i can change the name of the field through configurations?
    I understand that in a infotype, we can change the field name through translation. But can we change it in BSP? I was told to explore on how to configure via OTR.
    Can anyone share on the steps involved?
    Many thanks in advance.

    Well quite easy,
    create a context for an otr text (E-Recruiting are in package PAOC_RCF_UI). You will find that in SOTR_EDIT.
    Activate this context with implementing BADI BTFR_CONTEXT.
    After doing this, adjust context in SOTR_EDIT with Go To -> Context -> Adjust.
    Eventually refresh otr buffer with Transaction /$otr
    For one text there can be more than one OTR Text in backend, so you might change more than one.
    Regards

  • Can I display or export a list of all field names on a PDF

    In Designer 7, is there a way to display all field names (text fields and checkboxes)? Or is there any way to obtain a list of all field names used on a form?
    In Acrobat 7, all the field names used on the PDF will appear when you select the Text Field Tool. However, this will only happen when the fields were added using the form tools in built into Acrobat. These forms tools are not accessible in Acrobat when the PDF was created using Designer.
    For a PDF created with Designer, you can hover over a field in Acrobat to have a ToolTip display the field name. Unfortunately, this can only be done one field at a time.
    Thanks in advance for any info.

    Here is an example of how to get all the form objects' names within a node in the hierrachy. For a more complex form (with subforms), you will need to check to see if the node is a container. If it is, you will to use this code below to iterate that node.
    var objNode = xfa.resolveNode("xfa.form.form1.page1")
    for (var i = 0; i < objNode.nodes.length; ++i)
    app.alert(objNode.nodes.item(i).name);
    Here is an example:
    http://66.34.186.88/LiveCycleSamples/.3bbb371.pdf

  • How to retrieve the Field Name of a Table

    Hi guys,
    I'm trying to retrieve the field name of a table in java, but i don't know how to do it. Could somebody help me?Let say i have a table name Itemmaster, then
    i want to retrieve its field and display to dos prompt.
    Example :
    Item No.
    Description
    Quantity
    It is possible to retrieve the fields?
    What could be the possible command in java using packages Java.sql.*?
    Thanks in advanced...
    Best regards,
    Dharry

    The ResultSet class, which is how query results are returned in JDBC, has methods to get at the metadata for the table queried, including column names:
    ResultSet resultSet=statement.executeQuery("select * from table");
    resultSetMetadata=resultSet.getMetaData();
    resultSetMetadata.getColumnLabel(column+1);

  • Changing the field name at runtime in rpt file

    Hi everybody
    I'm using C# and Crystal Report XI (Deverlop license) to develop windows application in VS.net 2003.
    Please help me to change the field name of the bounded column of Crystal report file at the runtime.
    (In some case client's database had changed the structure as fieldname, fieldtype. Then they request a utility to change the field names in the .rpt file programmatically )
    Thanks
    GiangSon
    My email address: [email protected]

    user11200661 wrote:
    That's fine but still i want to prefix the schema name within the .sql file. My .sql should contain the name of that parameter only as i want to get that parameter replaced by the schema name at runtime. Some other users are using the same .sql file and they have access to that specific schema only. i want to make the .sql file more general so that it can be used by everyone without altering it every time.Sorry, your requirement no longer makes sense.
    If people have to access a specific schema because they need the script for general use, then you will have to hard code the schema name into it.
    If the script is to prompt for the schema name and connect to that schema and then use that schema name inside the called sql script, then people would not be able to use it generically, as it would be reliant upon the schema name being passed in.
    It sounds as if you're trying to write one generic thing that needs to do two different tasks.
    Just have two scripts and make life simple.

  • Changing the field names in a CFQUERY object

    Hello, I wonder whether you know the answer to this?
    I want to change the names of the fields in a CFQUERY result
    set after I have retrieved the results from the database (ie. I
    can't use "AS" in the original SQL statement). I can think of 2
    ways to do this - use the query-a-query (CFSQL) feature or just
    build and populate a new query object, as set out below:
    <cfquery name="CustList" datasource="name">
    SELECT CustId,CustName,CustAddress FROM Customers
    WHERE OrderStatus='P'
    </cfquery>
    OPTION#1:
    <cfqueryname="GenericList" type="query">
    SELECT CustId AS Id,CustName AS Name,CustAddress AS Address
    FROM CustList
    </cfquery>
    OPTION#2:
    <cfset GenericList = QueryNew("Id,Name,Address")>
    <cfloop query="CustList">
    <cfset unused = QueryAddRow(GenericList)>
    <cfset unused =
    QuerySetCell(GenericList,"Id",CustList.CustId)>
    <cfset unused =
    QuerySetCell(GenericList,"Name",CustList.CustName)>
    <cfset unused =
    QuerySetCell(GenericList,"Address",CustList.CustAddress)>
    </cfloop>
    Do you know which of these would be more efficient? And is
    there a better way, whereby I can maniplulate the names of the
    columns in the original query (ie. so that I can rename the
    "CustName" field to "Name" and then use "CustList.Name" directly)?
    Thanks!

    Thanks guys!
    If there is a close to zero overhead to the simple
    query-a-query then that seems like the way to go, with no need to
    look for a means of manipulating or modifying the original query.
    The reason I want to change the field names is so that the
    rest of my code can contain references to "CustList.Name" whereas
    otherwise I would have to do something like
    "Evaluate('CustList.#NameField#')" which is horribly messy. And the
    way the original query is generated means I can't use "AS" in it,
    but I still want to use the same code to work with that query
    result and other query results that share similar/related data with
    different field names.

  • Field name in database table

    Hi,
    Can we give the filed names start with '/' character, (like /name)? I saw like these field names in standard table MARA. How we create those fields in Z tables?
    Thanks.

    That are fields in Include structure.
    Yes u can create field with / in ur ztable.
    first create a structure by selection data type radio button in se11.
    in that structure create fields with /.
    NOTE: field must have 2 /.
    i.e ur field must be /str/struct1.
    activate it.
    now in ur database table goto edit menu select
    include->insert
    Give ur structure name .
    Message was edited by:
            Kalpanashri Rajendran

  • Navigate through block and keep all field names available to a report

    Dear OTN Members,
    when i press a button, it has to go to a BLOCK what i mentioned and it has to collect all field names those having Visual attribute name what i mentioned and this list i want to populate into a new block where i press button? is it possible in any way.
    thanks in advance

    Thank you Mr Natesh,
    but for me it is not possible to send the form, the form consists of lot of blocks and again i have to send you SQL scripts to generate respective blocks etc. if you can think of it with example block A with 20 fields, and block B with a field multi record block, here i want to populate all A.20 field names into B. again the fields in A are differentiated with Visual ttributes 2 types. here i want to restrict the list to a perticular VA.
    hope you will help me in this.

  • Who can give me all the name of system table or organization table in sap?

    Who can give me all the name of system table or organization table in sap? such as the table stores the client,company code ,plant,transaction code ,sap menu,purchase organization along with the relation between organizations such as
    the relation between company code and plant, the relation between company and purchase organization and so on.Pls supply the list of table name or the url where I can see these information.
    Thank you in advance.

    Hi YuLin
    refer this link you will get all tables in SAP with description and relation.
    http://www.erpgenie.com/abap/tables.htm
    regards
    Yogesh

Maybe you are looking for

  • Upgrading from weblogic 10.3.0.0 to 10.3.2.0?

    Hey guys, I am currently trying to upgrade my 10.3.0.0 weblogic server to 10.3.2.0 and i receive an error message stating that "The product maintenance level of the current installer (Weblogic Server:10.3.2.0) is not compatible with the maintenance l

  • UDF Problem in message mapping

    Hi, I have proxy to file scenario where i am getting mapping error Runtime exception during processing target field mapping /ns0:DataManagement/payrollArea. The message is: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._DataManage

  • Tab menu background problem

    I am using the spry tabbed menu and currently I have the background image of the entire header section set to a repeating image. I left the tabbed menu div background color and image blank so that the header section will come thru. It works fine in I

  • SAP BC Developer 4.6 -  Unable to locate or start compiler

    Hi Everyone, I am using the SAP BC Developer 4.6. I have created a Java service and written some java code in it. When I try to "Save" it gives me following error: "The source was saved, but was not compiled due to the following errors: com.wm.util.L

  • Can someone please tell me how I can crop a picture to put as wallpaper on my iPhone 4?

    I have the iPhone 4 and when I want to put a picture as my wallpaper it makes it really big, how can you fix that? Can someone please help?