If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > SQL / Report help

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-12-04, 14:22
HomersDonut HomersDonut is offline
Registered User
 
Join Date: Nov 2002
Posts: 37
Question 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.
Reply With Quote
  #2 (permalink)  
Old 04-12-04, 16:11
Littlefoot Littlefoot is offline
Lost Boy
 
Join Date: Jan 2004
Location: Croatia, Europe
Posts: 3,629
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 16:14.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On