Home Forums SQL Server 2008 Working with Oracle Convert date format in SQL sever report(BIDS) with Oracle date format RE: Convert date format in SQL sever report(BIDS) with Oracle date format

  • when i said parameters, i mean on the report side, sorry for the confusion.

    if you are building a string and executing it from your report, without parameters, you need to follow the full oracle syntax and rules...oracle doesn't allow variables with @ in them.

    I don't have oracle handy right now, but here's the basic syntax, I believe.

    the param_ replacing @ is not required, iot's just a naming convention and is completely optional, i just used it for clarity.

    DECLARE

    param_bdate DATE;

    param_edate DATE;

    SET param_bdate = TO_DATE('01/15/2010','MM/DD/YYYY');

    SET param_edate = TO_DATE('01/15/2010','MM/DD/YYYY');

    Select * from mytable

    Where mytable.date Between param_bdate AND param_edate ;

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!