Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...Within the first afternoon I found 2 of the 3 needed solutions, and the 3rd came to me over the weekend!..."

Geography

Where in the world do Tek-Tips members come from?
bilalch (Programmer)
11 Oct 03 5:55
hi dear frends.

 i want to select the qyery dynamically on the basis of
 my parameter form.
  
 i heard that it can b done through
  srw.do_sql
 but i dont know how and where to use it .
  plz help me.

  
lewisp (Programmer)
12 Oct 03 9:16
Specify a lexical parameter and you can make a SQL statement as dynamic as you like, as long as the number and types of the columns remain static.

For example, you could specify a SQL like this:

SELECT something
FROM   a_table
&where_clause


...then you pass in the where clause to the where_clause parameter when you run the form.
bilalch (Programmer)
14 Oct 03 1:48
hi dear lewisp,

that's alright but the thing abt which i'm worried is how to pass the query selected with this criterion into the data model in the reports.

 like if i hav a static LOV having the values

 Customer
 Construction
 Date
 
 now i write code like this
 begin

  if :LOV='Customer'
   then
    select something
    from customer,product
    where  .....
    order by customer.c_name

  else if :LOV='construction'
   then
    select something
    from customer,product
    where  .....
    order by product.construction

  end if;
  end;

** the point is , will it work besides the actual query given into the data model right in the start of the report.
 plz help
thanx
 bye
 
Posina (Programmer)
29 Jun 05 11:35
Friends,
I want to use an if clause in a select statement. Any help is appreciated.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close