472,805 Members | 1,375 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,805 software developers and data experts.

SMSS Sequential Queries using the same filters

I have an question. I have a script that basically runs two queries in the same process. One query tabulates member counts (based on the where filters) then combines that with their cost data in the second query (using where filters). I receive one table. Is there a way to write it in code to have only one set of where filters, whereby the second query relies on the first queries where filters? This way I only have to modify it once?
Sep 20 '19 #1
2 1870
12,516 Expert Mod 8TB
Probably, yes.

We would need to see your code.
Sep 20 '19 #2
32,534 Expert Mod 16PB
You may be able to make use of a CTE (Common Table Expression) but, as Rabbit says, we'd need to see your code.
Sep 22 '19 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Steve | last post by:
I am using Access 2000 and I have a DB that is currently running four different queries from some Forms and subforms. These queries each have a date field that are seperate from each other that are...
by: Steve Elliott | last post by:
I have a query set up to gather together data between two specified dates. Shown in the query column as: Between #24/09/2004# And #01/10/2004# Is it possible to enter several different date...
by: italiak | last post by:
Hello everyone- I have these 500 queries in access. They all do the same thing (append data from big database to a table) and have similar condition. I was wondering if there is a way I can...
by: Rich | last post by:
Is there a way to inform all users concurrently using same web application when one user has made changes to data? Remote scripting has that ability to send data to client but can't be done...
by: Dieter Vanderelst | last post by:
Hello, I'm trying to access the Filters-Dll provided by the filters-project (http://filters.sourceforge.net/index.htm). Following the advice I got from the Python list -thank you for that-, I...
by: Jeff | last post by:
Hi, I am trying to use vb code to set the filter on a form so that only people with a common property can see each other on a form when they open it (like if they are in the same department)....
by: leesa | last post by:
I have a number field in a sequential file. Im going to read this file, sum up this number and display the grand total in my application using VB. Do anyone know how to do that?? Thanks in...
by: Chris Gilpin | last post by:
Hey everybody. I have Access set up using VBA to run a bunch of queries automatically, and then export the results into Excel. The only problem is, I want each query to be exported to the same...
by: Aaitaman Tamang | last post by:
All, Any Help to solve my problems? I have been trying add some more table using below VBA codes but still i have not got any ides how to do this. As you all can see below...
by: nilanjanam | last post by:
hello guys! i have a table of doctors with following columns given below and i am want to fetch details by date using submit button. but i cant filter the queries for details of...
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
by: lllomh | last post by:
How does React native implement an English player?
by: Mushico | last post by:
How to calculate date of retirement from date of birth
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.