Using ODBC how do you identify a calculated column in a table?

I've a calculated column in my table. Is there a way to identify that column through ODBC functions? I need to identify the  calculated column and make it read only. The function should support both SQL and Access databases. Please let me know if
there is a way to find out this column type.

Hello,
You can refer to the following article which list some ODBC Scalar Functions which you can used in the T-SQL query statement.For example
SELECT {fn TRUNCATE( 100.123456, 4)};
-- Returns 100.123400
Reference:http://msdn.microsoft.com/en-us/library/bb630290.aspx
As per my understanding, there is no built in declarative support for read-only columns. You can try to create a UPDATE trigger to achieving this. Or you can create a view with derived column  from the source table. And then users cannot
update this calculated column on the view.
Regards,
Fanny Liu
Fanny Liu
TechNet Community Support

Similar Messages

  • Can you have a calculated column in a table not a view?

    We have a table which contains a series of rows
    Key   Effective Date   Value
    1       10/Feb/2006     123
    1       23/Oct/2006      456
    ...We have a requirement to store an indicator that tells us which row is the most current and what the end date of the preceding row was so that we get something along the lines of:
    Key   Effective Date   Value   Status         End Date
    1       10/Feb/2006     123      HISTORY    22/Oct/2006
    1       23/Oct/2006      456     CURRENT   NULL
    ...I can produce this result quite easily using the analytic function LEAD. My question is, is the answer to this problem to create a view over the table that includes the analytic function or is it possible to define a calculated column in a table that would populate/maintain this vale as part of a table definition?
    And as I finish writing this I feel I've answered my own question but hey, there's no harm in asking how others have handled this kind of situation.
    Cheers
    Richard

    My bias would be to create a view that did the calculation.
    In theory, you could add those additional columns to a table and maintain the data via a set of triggers, but that would be substantially more complicated than the alternatives for little or no benefit.
    A third option would be a materialized view. That might be easier to deal with if you want to have different indexing strategies for current and historical records or if the historical data is queried often enough and updated infrequently enough that it ends up being cheaper to do the calculation once during the update rather than every time the query is run.
    A fourth option would be to use stored procedures to maintain the data and have that stored procedure expire the current row and add the new row.
    Finally, you might consider version-enabling your table using Workspace Manager rather than writing your own code since Oracle has already written all this code for you.
    Justin

  • How do you identify duplicates?

    Since a photo can be assigned to multiple albums, how do you identify duplicates and their source?  Upon moving over to Photos, I now see a lot of duplicates showing up and have no idea where they belong so cannot just delete them ;-(

    hello,
    it is nice when you can answer your own question...
    looked in 'common...media core...' and found the new blue trial plugins
    also had the duplicates of the new blue plugins in the AE plugins 'effects' folder
    deleted the plugins from the 'media core' folder
    no more warning signs...
    cool deal
    back to work,
    j

  • Using numbers, how can you set percentage to show decimals?

    When using numbers, how do you set the format to allow for decimals in a quotient formula with the cell formatted for percentages?

    It would be 'View' > 'Sidebar' > 'Bookmarks'. Shortcut 'Ctrl' + 'B' on the keyboard.
    If the 'View' menu is not visible please try pressing 'Alt' + 'V'.

  • HT204370 i'm attempting to download a movie and it is stating the disk is full i am attempting to use.  How do you make space?

    i'm attempting to download a movie and it is stating the disk is full i am attempting to use.  How do you make space?

    Delete something

  • In windows 8 how do you make the bookmarks column "flexible"? I used to be able to make it narrower.

    Windows 8 how do you make the bookmarks column "flexible"?

    Is the problem with the Bookmarks Sidebar -- the one you can open and close by pressing Ctrl+b? It does seem to have a minimum width and won't get narrower than that, but I'm not sure whether you are running into that limitation or whether for some reason you are not getting the resizing arrow when you mouse over the thin border between the sidebar and the page.

  • How to identify the source column and source table for a measure

    Does anyone have a query that I can use to positively identify the source column and source table for a cube measure in an SSAS cube?  Visual Studio shows ID, Name, and Source, but it is nearly worthless in a large cube and database.
    Also - the same for a dimension would be great.
    If no query exists for this, can someone please explain how to find the source column/table for a measure and for a dimension?
    Thanks.

    DMVs don’t expose the DataSourceView content. AMO is much better suited for object model operations like
    this than the DMVs. PowerShell is also sometimes an option, but in this case C# code would be much easier because analyzing the contents of the DataSourceView is much easier using the .Net DataSet class.
    Hope this helps.
    Reeves
    Denver, CO

  • How do you count the multiple columns of a field in a table

    How do you count the multiple columns of a field in a table

    Hi,
    4396bf34-e890-4202-a6b0-4e08c9ff0e89 wrote:
    How do you count the multiple columns of a field in a table
    Whenever you have a problem, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002
    "Field" isn't a standard database term.  Some people say "field" when they mean "column", but I don't think that's what you mean ("How do you count the multiple columns of a column ..").  Do you want to know how many times a column is used (as opposed to NULL), or the number of different values in a column?  You really need to show what you want.

  • In Pages 5.2.2: How do you go from 1 column to 2 and keep them on the same page?

    In Pages 5.2.2: How do you go from 1 column to 2 and keep them on the same page?

    Sorry, I tried to say your answer solved my question, but I guess I told it that my response to you solved it. Now that I liked it, the solved option doesn't appear.

  • How can you modify the displayed columns on a Related Information List?

    How can you modify the displayed columns on a Related Information List? For example, how could you add the "Type" column to the List of columns displayed for Service Requests when you are viewing the Contacts Detail page?
    Thanks

    I'd have to say I think this is one of the biggest flaws in the OnDemand system currently. The solution I have come up with is to create reports and put them in webapplets showing the data I want to show. I have then removed the standard Related Info List Objects and added weblinks to create new records as the button on the List object is also gone.
    Keep in mind that doing this does slow things down a little, so it may not work if you have a big user base.
    RWB.

  • Calculated column in pivot table

    How can I add a calculated column (Daily Average) in a pivot table like this?
    "Product" in row and "Date" in column and a "Daily Average" column to the right.
    Date1 Date2 Date3 +Grand Total       Daily Average+
    Product

    click right mouse on column you will get duplicate column
    in duplicate column propties you have option like aggreate avg apply it you will get result
    regards
    bethamsetty

  • How do you add calculation columns to a table Region by using the Footer?

    I have a requirement to add some aggregate metrics at the bottom of my "tableRegion". The "TotalValue" property value for the table is not going to work for me since I the data I'm calculating is more complicated then doing a simple "sum".
    My first try (simple test case) was to use "OATableFooterBean". However, when it tries to find the table bean, it comes back as "null":
    if (empDetails != null) {
    OATableFooterBean tblFooter =(OATableFooterBean) empDetails.getFooter();
    if (tblFooter != null) {
    tblFooter.setAttributeValue("EmployeeName", "Merit Inc Target/Budget");
    I'm guessing it is due to not defining a "footer" region for my "table" region. When I click on the "Table" region, then due "New", I dot see "Region" listed as an option. So my question is how do I add a region "footer" to my "table" region? Once I have that, I'm sure it will solve the "null" exception I'm seeing for trying to get the table footer in the above code.
    Thanks

    Hi,
    For this create a transient attribute in the VO.
    Perform your required logic on this new transient attribute.
    Now create a footer region and create a styledtext and assign this transient attribute.
    Regards
    Sridhar

  • How do you identify the Logical system in start routine of a transformation

    My scenario is this.  I have five r3 systems that I am extracting from.   In the start routine of the transformation from the r3 data source to my data store I  am going to delete data and I need to know the source system id.    How do I identify the logical system or source system id in the transformation.  Is there a system field that contains this information.    I do not want to hard code the source system id in the routine.

    hi
    have a lool at tables rsreqdone and rsbkrequest with a join you should be able to determine the source.
    regards
    Boujema
    How to give points: Mark your thread as a question while creating it. In the answers you get, you can assign the points by clicking on the stars to the left. You also get a point yourself for rewarding (one per thread).
    Edited by: Boujema Bouhazama on May 9, 2008 12:04 AM

  • How do you identify your Mac mini 1.83Ghz between MB138LL/A and MA608LL/A?

    A friend of mine told me, in Taiwan, it is possible to have an old 1.83Ghz Mac mini when you wanted to buy a new 1.83Ghz Mac.
    If I decide to buy a 1.83Ghz Mac mini, how do I know if it's the 1.83GHz Mac mini (MB138LL/A), not a 1.83Ghz [MA608LL/A] one?
    How do I identify it?
    We don't have a CPUID software for Mac OS, do we?

    click on the apple button on the upper left hand of the screen.
    click the first option (my mac is in german, so I dont know what the word is in english)
    if it says "intel core 2 Duo" then you have a new one, and if it says "intel core duo" it is an old one

  • Using RMAN, how do you restore from an old backup file?

    HI,
    I use Oracle 9i on Solaris.
    I'm currently doing incremental level 0 hot backups every night using RMAN in NOCATALOG mode. The controlfile is backed up with the database. I back it up to a file (e.g. "level0_20041225.dmp"). After I back it up, it's backed up to tape using Veritas. Before doing a backup, I delete the old one first.
    I need to restore a copy of the database backup that was taken a month ago. This file is on tape. How do I go about it using RMAN? The documentation is not too clear as it talks more about Restoring the control file and the latest copy of the database.
    How do you restore an old copy of the database from a database file?
    Pls advise
    Thanks

    You can recover to the last committed transaction,
    provided you have the current controlfile, archived
    logs since the backup and the current online logs.
    Here's the procedure in a nutshell:
    a) Restore datafiles from tape.
    b) Recover database using restored files + current
    controlfiles and archived/online logs. RMAN will prompt
    you for the logs it needs for recovery.
    You can also perform this type of recovery using a
    backup controlfile. In this case you would still need
    all logs as above. After recovery, you would have to
    open the database with RESETLOGS because you are using
    a backup controlfile.
    If you don't want/need to recover up to the last
    committed transaction, you use a backup controlfile and
    perform incomplete recovery (time or change based). This
    simply means that you stop the application of redo at
    the time or SCN of your choice.
    Most of the scenarios of interest are documented in
    the following book:
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96566/toc.htm
    Hope this helps.
    Kailash.

Maybe you are looking for