Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2002
    Posts
    37

    Question Unanswered: SQL / Report help

    I am trying to make a one-page report that is made up of multiple sections. Each section uses a different query.
    The queries I use have the same parameters names defined to get a start and end date.

    I tried to make a report with sub reports, in an effort to get all the same info on one page, but I get prompted for the date parameter 4 times, even though the parameter names are the same throughout all queries.

    I am not sure if I should be using unbound objects or maybe define the variables globally in VBA <--still learning.

    Hopefully I explained my problem well enough. If not I'll reply asap with further clarification.

  2. #2
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    If it is about Oracle SQL, substituting '&' with '&&' might solve your problem.

    Ah, sorry ... VBA.

    However, if it works in Oracle, perhaps there's something similar. For example, if you have
    PHP Code:
    SELECT ... FROM table_1
    WHERE id 
    = &par_id;

    SELECT ... FROM table_2
    WHERE id 
    = &par_id
    it'll ask you to enter value for 'par_id' twice. But, if you have
    PHP Code:
    SELECT ... FROM table_1
    WHERE id 
    = &&par_id;

    SELECT ... FROM table_2
    WHERE id 
    = &&par_id;

    UNDEFINE par_id
    it'll ask you only once.
    Last edited by Littlefoot; 04-12-04 at 17:14.

Posting Permissions

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