Re: Please Please Help!!

From: Ayeda (ayeda_at_emirates.net.ae)
Date: 01/10/04


Date: 10 Jan 2004 04:01:20 -0800

Thanks alot Dude..
I am trying the other group u suggested.

Regards
Ayeda

Programmer Dude <Chris@Sonnack.com> wrote in message news:<3FFC6561.A96A56B2@Sonnack.com>...
> Ayeda wrote:
>
> > Dont know if this is the right place to submit questions.
>
> It's the right place to submit the right sort of questions!
>
> > I need to convert this pl/sql function to java function so that
> > i can use it my jsp page.
>
> That's pretty much a right sort of question, but you may be
> better responses if you seek out a newsgroup that is specifically
> for, either, Java or this PL/SQL.
>
> I don't do much (hardly any) Java, but SQL (in general) is an
> old friend. I'll tell you what I can:
>
> > FUNCTION countItem(adminUser IN STRING,
> > m_menu IN NUMBER)
> > RETURN NUMBER IS
> > cno NUMBER := 0;
>
> (Obviously) A function taking a string and a number and returning
> a number.
>
> > CURSOR cAdminMenu(adminUser VARCHAR2 ) IS
> > [snip]
>
> An SQL query. It combines three separate queries into a single
> table. There's also a sub-query in one of the WHERE clauses.
> Appears to be querying some sort of pages and menus DB, and is
> mainly keying off the value of the string passed into the function.
>
> You'll have to solve the problem of accessing the data in Java.
> Don't know if Java supports and SQL connectivity, but I'm sure
> there's a way.
>
> > BEGIN
> > FOR t IN cAdminMenu(adminUser) LOOP
> > IF t.menuid = m_menu THEN
> > cno := cno + 1;
> > END IF;
> > END LOOP;
> > RETURN cno;
> > END;
>
> The table generated by the query is scanned over, and a count is
> made of items that match the number passed into the function.
> The number of matching items is returned.
>
> HTH,



Relevant Pages

  • Re: Please Please Help!!
    ... It's the right place to submit the right sort of questions! ... for, either, Java or this PL/SQL. ... An SQL query. ... The number of matching items is returned. ...
    (comp.programming)
  • Re: e-commerce portal
    ... haven't had a single site that sees a need for this sort of hardening. ... Java anymore. ... PHP is a technology that has gotten a harsh rap due to large security ... Marketing at its worse, eh? ...
    (comp.databases.pick)
  • Re: An interview question
    ... The interviewer said that in C++ std lib, sorting algorithm is quick sort ... by default, while in Java, the default one is merge sort. ... Another thing to note isthat the incredible speed of quicksort is not due to ...
    (comp.programming)
  • Re: e-commerce portal
    ... because I've never really been able to purposely hit it. ... pool licenses sitting in the background and at the most I've seen 18 ... haven't had a single site that sees a need for this sort of hardening. ... About Java, it's really a shame that by the time RD finally came out ...
    (comp.databases.pick)
  • Re: Sorting the Arrays
    ... just by advising how to invoke the charSortArray ... Im a new to java, so Im trying to learn, but I need help on some part, Im ... I've look at ways to sort arrays on the net but I ddin't get any ... >> at the point where I have to sort the Array ...
    (comp.lang.java.help)