CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2004
    Posts
    265

    Column name from value

    Hi,

    I have a datarow retrieved from a datatable. I have a value that exists in some column in the datarow. I want to find which column this value is in. How can I achieve this please?

    Thanks

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: Column name from value

    Loop through the fields of the "datarow" to find the value that equals your "value".
    Note that there may be many fields with the same value.
    Victor Nijegorodov

  3. #3
    Join Date
    Feb 2012
    Posts
    4

    Re: Column name from value

    SELECT * from dba_objects
    WHERE object_name like '%DTN%'

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured