Results 1 to 3 of 3

Thread: If statment

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2005
    Posts
    136

    If statment

    i have added a parameter wich has a selection ( start date and process date)
    if user select start date then
    select statment 1
    else
    select statment 2
    end if

    ive tried to write this if statment inside Dataset but give me an error
    this designer doesnt graphically support the IF SQL construct

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: If statment

    What is the error that you are getting?

    Please post the actual code that you are using.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jan 2005
    Posts
    136

    Re: If statment

    VB Code:
    1. if @procDate ="Start Date"
    2.              SELECT *
    3.              FROM         TableName
    4.              WHERE     (Field1 >= @ProcDate1) AND (Field1<= @ProcDate2)
    5. else
    6.             SELECT *
    7.             FROM         TableName
    8.             WHERE     (Field2 >= @ProcDate1) AND (Field2 <= @ProcDate2)

    error
    This designer does not graphically support the IF SQL construct.

    Note ProcDate is a parameter which has 2 options Start date and process Date
    Last edited by nana_81; Jan 29th, 2006 at 11:45 PM.

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