DBAsupport.com Forums - Powered by vBulletin
Results 1 to 10 of 10

Thread: Searching the DB for a specific value

  1. #1
    Join Date
    Dec 2007
    Posts
    4

    Searching the DB for a specific value

    Hi

    I am an java developer and entering data from the JSP into the Oracle database.

    My query is that i want to search all the table names where a specific value is present.

    Suppose i entered a string called "Hello" from JSP and it got stored in some database table. I want an SQL Query which returns me all the table names where this value "Hello" is present.

    Please help me in this regard. Ite very urgent !!!!!

  2. #2
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    I can appreciate this is a very urgent matter to you... I bet your term paper is due in a few days and you have not clue about what's going on.
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

  3. #3
    Join Date
    Dec 2007
    Posts
    4

    Any Help???

    Thanks for the concern. But i would appreciate if you could please provide solution rather than consolation !!!!

    Quote Originally Posted by PAVB
    I can appreciate this is a very urgent matter to you... I bet your term paper is due in a few days and you have not clue about what's going on.

  4. #4
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    We don't do school work here.
    Show us your best effort and we will gladly point you in the right direction if needed.
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

  5. #5
    Join Date
    Dec 2007
    Posts
    4
    Listen Mister

    I didn't ask for any favor from you and you better shut up saying this challenging task as home work which you do generally. I can understand that this problem is beyond what you can think and thus showing your frustration on unable to solve it.
    I gracefully request you to poke your nose some where else.

    P.S: Dear moderators. I appologize but this fool's remarks were getting on my nerves.

    Quote Originally Posted by PAVB
    We don't do school work here.
    Show us your best effort and we will gladly point you in the right direction if needed.

  6. #6
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    Quote Originally Posted by skyineyes
    Listen Mister

    I didn't ask for any favor from you and you better shut up saying this challenging task as home work which you do generally. I can understand that this problem is beyond what you can think and thus showing your frustration on unable to solve it.
    I gracefully request you to poke your nose some where else.

    P.S: Dear moderators. I appologize but this fool's remarks were getting on my nerves.
    So... you are a lazy-cheater with an attitude?
    Way to go.
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

  7. #7
    Join Date
    Nov 2002
    Location
    Mooresville, NC
    Posts
    349
    Find out all the table names from dba_tables or user_tables depending on you requirement.
    Find out column names for each table from dba_tab_columns or user_tab_columns.

    Lets Say you get a table name T with column name C.
    Do a select count(*) from T where C='HELLO';

    You need to do this in PL/SQL procedure.

    PS: I support PAVB it seems to me like a school assignment and you should agree you don't have a clue how to start this. And mind do not put here anything URGENT. We do here volunteer work coz we love it.
    http://www.perf-engg.com
    A performance engineering forum

  8. #8
    Join Date
    Dec 2007
    Posts
    3
    i guess the query still seems to be un-answered.

    how to do the following
    "Find out all the table names from dba_tables or user_tables depending on you requirement" ???????????? i guess skyineyes wants answer for this only.

    may be it seems like a school assignment but still it somewhat tough !!!


    Quote Originally Posted by malay_biswal
    Find out all the table names from dba_tables or user_tables depending on you requirement.
    Find out column names for each table from dba_tab_columns or user_tab_columns.

    Lets Say you get a table name T with column name C.
    Do a select count(*) from T where C='HELLO';

    You need to do this in PL/SQL procedure.

    PS: I support PAVB it seems to me like a school assignment and you should agree you don't have a clue how to start this. And mind do not put here anything URGENT. We do here volunteer work coz we love it.

  9. #9
    Join Date
    Nov 2002
    Location
    Mooresville, NC
    Posts
    349
    We are not here for baby sitting.
    If you can not do that much i guess you are one of those lazy asses i come across time to time. Lazy boy come on kick some ass.
    http://www.perf-engg.com
    A performance engineering forum

  10. #10
    Join Date
    Jan 2008
    Posts
    7

    Smile

    Dear Skyineyes:

    Sorry you've been banned; but, in case you can still view your posting. You have to know the table's and column's names that you inserted your value "HELLO" into before you can do a search for it.

    DBA_TABLES, USER_TABLES, ALL_TABLES, DBA_TAB_COLUMNS, etc. will only help if, at least, you have idea of what you're looking for. Then, the next step would be to construct the query to retrieve the value(s).

    DSupp2008

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