Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8921443
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T06:32:40+00:00 2026-06-15T06:32:40+00:00

I got a really big problem. I am writing an App for building a

  • 0

I got a really big problem.
I am writing an App for building a txt-file with some data from the Oracle-DB.

So actually i got a problem with the data_default column (type LONG).

Let’s post some code:

Here’s my Select:

SELECT table_name || '.' || column_name, data_precision, data_type, nullable, data_length, data_default 

Here is my way of reading out the data:

string dataDefault = (dataReader[5].GetType() == typeof(DBNull)) ? "" : Convert.ToString(dataReader.GetString(5))

So maybe it’s not the “pretty” way but i have a big problem with LONG data types here. I can’t get the data from data_default in this way.
I searched on the internet, but i want to solve this problem within C#-Code. If it’s not possible, please don’t overestimate my SQL-knowledge 😉

Have a nice day,
Clemens

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T06:32:42+00:00Added an answer on June 15, 2026 at 6:32 am

    I got the answer! After a long time of searching and forging i wanna post the final solution:

    create or replace function get_col_default
    (
    p_owner in all_tab_cols.owner%type,
    p_table_name in all_tab_cols.table_name%type,
    p_column_name in all_tab_cols.column_name%type
    )
    return varchar2
    as
            l_data_default LONG;
    begin
            select data_default into l_data_default
              from all_tab_cols
             where owner = p_owner
               and table_name = p_table_name
               and column_name = p_column_name;
    
            return substr( l_data_default, 1, 4000 );
    end;
    

    And then you can create this query for example:

    select a.table_name, a.COLUMN_NAME, get_col_default('exOwner',a.table_name,a.COLUMN_NAME) 
    from all_tab_columns a
    where  table_name like 'table%'
    and owner like 'exOwner'
    

    The good thing about this is, that you can extend that function very easy and won’t be limited to 1 result/execute. (i had this problem in some further ideas)

    Have a nice day! 😉

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I got some really big lists where I need Counts from specific queries without
I've got one really big .java class file that has a lot of members.
I have got a problem. My program is really big and java is throwing
Maybe something really simple, I got really big problem with... ORM result. I'm loading
I've got a really big problem with my image storage server. There are about
Our team and project got really big and we can no longer sustain it.
I've got a really big number: 5799218898. And want to shift it right to
OK I've got 2 really big classes > 1k lines each that I currently
here i am again :( got big problem hiks ... need HELP !!! i
I got an XML file from 3rd party that I must import in my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.