Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Declaring variables

edited May 2007 in General
I am using Report Explorer V10.03.

I have some SQL code that I wrote and I am trying to copy it over to a
Customer Query in Report Explorer. It works fine as a query in SQL Server
Management Studio.

The begining of it is:
begin
declare @cur_per varchar(6)
set @cur_per= ................


When I verify syntax within Report Explorer I get the following:
EOleException: Incorrect syntax near the keyword 'begin'.

So is there another way that I need to go about this in report explorer? Or
is this not going to work for me at all?

Thanks,
Mike

Comments

  • edited May 2007
    Sorry, thats Custom Query.. not Customer Query. Guess I am having trouble
    typing today. :-)

  • edited May 2007
    Hi Mike,

    The SQL code you can enter into the Query designer in DADE is more of less
    the same SQL code you can enter into a TDataSet descendent such as a
    TADOQuery object on a form. If you place a TADOQuery object on your form
    and add the code you mentioned below are you able to successfully access the
    database?

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.