Results 1 to 2 of 2

Thread: If else condition in .SQL URGENT

  1. #1
    Join Date
    Feb 2003
    Posts
    49

    If else condition in .SQL URGENT

    Can u give use if and else conditions
    in a .sql file...
    if not what are the other possible ways to use that condition.

    What i am looking for is that
    user enters to date and from date
    based on the no of week between those dates,
    if noofweek > 12 ..then
    display data quaterly wise
    if noofweek> 4 then
    display data month wise

    so help me ..i have to do this in .sql file only...

    thanks in advance

  2. #2
    Join Date
    Mar 2003
    Posts
    468
    what database are you using?

    for oracle:
    you can not have if..then..else statements in a normal sql statement.

    you can prompt / ask the user for data input and then possibly use functions such as decodes to evaluate the entered information.

Posting Permissions

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