Alternative SQL Query

Jun 19, 2007

I have a query worked out with the exact result I'm looking for, but it's kind of slow. Can someone find another way to write up this query?SELECT EID, ShortName, ClassID
FROM (
SELECT Employee.EID, Class.CID, Class.ShortName
FROM Employee, Class
) AS Temp1
LEFT JOIN [Class Attendance]
ON (Temp1.CID=[Class Attendance].ClassID) AND
(Temp1.EID=[Class Attendance].EmployeeID);The inner (green) query pairs every employee with every class they could possibly take (cross product). Then that query is joined with the attendance table to show who has taken which class. If a class hasn't been taken the ClassID will be null like so:EID ClassID ShortName
=========================
111-11-1111 1 ISM
111-11-1111 2 ABC
111-11-1111 BGP
222-22-2222 ISM
222-22-2222 2 ABC
222-22-2222 3 BGPSo is there an easier way to get this result?

View Replies


ADVERTISEMENT

Alternative To Replication?

Dec 15, 2005

I am having multiple user problems with access 2000 quite frequently, and I thought that replication would solve this, as it stands however its proving difficult to get my hands on the developer edition, just wondering, is it worth the hassle to get it, or is there an effective alternative to replication?

View 6 Replies View Related

Is There Alternative For This Code

Feb 22, 2006

The following is loaded in a query:

The field is called CS:
Like [Enter Specialist Last Name Only] & "*"

It works ok, but of course if you don't type anything it will bring all the records up for view, and I don't want that to happen. Can I do something that won't make that happen?

View 4 Replies View Related

DDESend Or An Alternative

Jan 23, 2008

I want to be able to use something like DDESend for putting data into word bookmarks. I already have several instances where this is done with code but I need some others with a simple thing like DDESend.

The problem I have with DDESend is when the form opens a box pops up asking if the Word file is to be opened. I tried with code to first open the Word.doc file and then have the code open the form with the DDESend text boxes but that ends opening two instances of the same Word.doc and the screen all quivers:D

If I just open the form in question and then click OK to open the Word.doc, then close and reopen the form (but without closing the Word.doc, just shrinking it) then all is well. But it is not practical to do that for what is wanted.

Any ideas or an alternative to DDESend. An alternative would need to be simple like a DDESend in text box as it requires someone to be able to easily change field references.

View 2 Replies View Related

Alternative To Listbox?

Oct 9, 2007

Hello

I am designing a database in which I have used a lot of listboxes sourced to tables. I need to run queries on the listbox results but this doesn't always work due to the listbox/query issue, (found on this forum).

Is there an acceptable alternative to listboxes as the only thing that I can think of is to use checkboxes which would make the data entry for the end user interesting? (The only way around this would be to have individual databases for each person, this defeats the objective of having a database...)

Many thanks

Loopster

View 3 Replies View Related

IIf Or An Alternative Function.

Nov 23, 2007

In a table with 5000 records there is a field named "products" with 800 differents products (product1, product2, … product800).
I want to create a new field in a query and mark 100 of these products as "Not available" and the rest 700 as "Available".
For a small number of products I can do this in QBA, using IIf function.
E.g. Products not available:IIf([products] ="product5";"Not available"; IIf([products] ="product10";"Not available"; IIf([products] ="product22";"Not available";"Available"))).
How can I do this for 100 products
Thank you.

View 3 Replies View Related

Alternative Printer

Nov 6, 2006

I wish to send a report to the PDF printer driver but DO NOT wish to switch the default printer settings. Having found some helpful code on this forum that changes the default printer to the PDF driver, prints the job and then reverts the default printer back to the original printer device.

I am still using Access '97 and although in the code, the default printer does revert back to what it was originally, the Default Printer status 'tick' no longer appears under Start/Settings/Printers.... Consequently, subsequent print jobs outside of Access go to another device and not my DEFAULT printer.......???

Any ideas would be gratefully appreciated.

Oh - in case I wasnt clear - I want to do this in code NOT using the Print dialog box.... !

View 1 Replies View Related

MS FlexGrid Or Alternative

Mar 14, 2006

Hi,

Can I use MS Flexgrid in MS access ? When I try to use it, it shows I need licence. Is there any alternate method to use flexgrid or is there any alternative ? Basically, I need to facilitate edit and save option for users. Urgent help required ?

View 6 Replies View Related

Alternative To Application.FollowHyperlink

Jul 28, 2005

Hi!

I have a helpfile that I want to open on a Event. But when i use Application.FollowHyperlink I get an annoying warning (the file can contain viruses or in other ways damage your computer) so I wonder if there is another alternative to Application.FollowHyperlink?

Thanks,
Johan Hjalmarsson

View 1 Replies View Related

Alternative Colours In A Form

Mar 15, 2005

Hi I've got some code from http://www.lebans.com/alternatecolordetailsection.htm

It allows for alternate bands of color to be displayed for alternative records in Forms in Continuous View. I've looked in this forum for other alternatives to this but the only ones that are available change the background of a control rather that display a whole row that is filled with colour. So therefore the background of the row is say in red, the background of the text controls are in red.

I've managed to put the code into my form and download the class. The only problem is that I can't seem to set the colour in the actual class file - it's all a little bit confusing! Can you help? Pleaseeeeeeeeeeeeeeeeeeeeeee........... :D

You can download the sample database from http://www.lebans.com/alternatecolordetailsection.htm

:)

View 1 Replies View Related

Help Needed With Security Alternative

Jul 28, 2006

Hi

I have a custom login screen created for my database and a table with access levels for different users. I am trying to assign user permissions so that certain buttons on the switchboard are visible/not visible dependent on the user security level. As the login screen and the switchboard are on seperate forms, is there any way I can do this??

I've been pulling my hair out since last night so any help at all would be appreaciated

cheers

View 8 Replies View Related

Workgroup Security Alternative?

Apr 21, 2005

I was looking for free access add-ins through a search engine when I came across this site. I'm not sure whether or not some of the more seasoned programmers have seen this, but so far it looks like a less confusing alternative to the security features that access comes with. I'm not in any way advertising this, and I haven't tried it myself yet, so I can't speak about how good or bad it is, but it may be something worth looking into. Here are the links:

http://www.accesswizards.com/Downloads.html This lists the add-ins that are available from this particular site.

http://www.accesswizards.com/SecDetails.html This is the "read me" information about the security add-in.

View 1 Replies View Related

Can't Create MDE File - Alternative

Dec 7, 2005

I have tried to create an MDE file for my database but can't figure out why it will not let me. I can't don't think I am over the limit in open TableIDs. I have 76 Forms and 91 Tables.

I am setup with two databases - the database with the data is on the server. Is there any other alternative that I can do other than putting the mdb file directly on the client. And if not is there a way to stop the mdb file from constantly growing in size.

View 4 Replies View Related

Subdatasheet Not Sufficient, Please Give Alternative

Dec 28, 2004

What I am doing, is I have various products with 5 basic fields. I then wanted to add an array of text fields to 2 of those original 5 basic fields. I attempted to do this with a subdatasheet, however, a subdatasheet is not record specific, is not directed to a specific field, and really does not do anything that I want.

Say that the basic field is ProductDescription. I want one column of fields to correlate to it, like below.
ProductDescription
Is blue
Is large
Is heavy
Is strong

Each product will have a different amount of varying descriptor fields. Once understand how to incorporate this with my project, I then will need to understand how to add the subdatasheet to a report easily. Thanks for any help,
-SethTherrien

View 3 Replies View Related

Populating Form - Combo Box Or Alternative?

Aug 28, 2006

If any one can make a suggestion it would be great. I have a list of names with phone numbers, addresses and emails. I thought I could use a combo box to select the name and and have the other date associated with it come up in the appropriate boxes set. I can't get it to work. Does any one have any suggestions on how to make it work or another method that can be used. The out come I want is to allow someone to pic name from a list which will then set the phone number, address and email correct. Ideas would be great.

Thanks Tracey

View 1 Replies View Related

Forms :: Alternative To Combo Box And List Box?

May 6, 2015

I am trying to avoid to use a Combo Box & a List Box because of the way the records are stored in the table, I only need to verify that the user does not enter a 3 letter code that is not contained in a specific table (I have a table of countries with the 3 letter code example if the user types ESC instead of ESP an error appears) Is it possible to use the after update to verify the contents against a table?

View 4 Replies View Related

General :: Saving Records In Alternative DB?

Jul 6, 2012

I have a stock db with records that go back to 2006. I want to clear some of the old records but save them incase required. I still need to leave from 2010 until present on the db. I have a front and back end on the db.

View 1 Replies View Related

General :: Change Splash Screen For Database Using Method Of Creating Alternative Bitmap

Oct 17, 2014

I've changed my splash screen for a database using the method of creating an alternative bitmap.Is there a time setting for this or an alternative?

View 6 Replies View Related

Query In Forms Question (printing A Single Selected Query Record From A Form?)

Oct 19, 2004

What is the best way to impliment a query in a form so that the user can view the query records, and have the option to print or save the selected record using command buttons?

I tried subforms but I could not get the command buttons to work in the subform after it went into the form, it wanted to print the entire form instead of the selected record from the subform.

So in a nutshell I have 3-4 queries that are built, and I want to have them show up on my form in a format that the user can scroll through the results and select a single record of the results and then print or save that individual record from the form, if such a thing is possible.

Thanks in advance

Todd

View 1 Replies View Related

Queries :: Join Results Of Unmatched Query With Matched Query To Include Null

Mar 24, 2013

I am trying to do the good 'ol sales report (query) to include customers with no sales.

I have a customers table, account number table, sales table & sales (line) detail table. (all linked in that order)

If I run a query to show customers (in the customer table) with account numbers, that works

An unmatched query to show customer without an account number works (but of course the unmatched account number field isn't shown).

How can I get the two two be shown together with the "unmatched" having a null or 0 for their account number?

I am guessing in principle, the resulting solution can be modified to show customers without sales alongside those with sales?

View 3 Replies View Related

Queries :: Opening Design View Of Append Query Without Timing Out Source Query

Mar 4, 2015

In some cases I create pass-through queries and use these in an Append or Make-table query to bring data locally.

All is well and fine until source data changes and the pass-through query runs too long and times out.

If needed, I can extend the timeout value in the Parameters of the pass-through query no problem, but when I try to open the Append or Make-table query in Design view to do the same, the pass-through query is first triggered and then throws the timeout, and I cannot access the Design view of the Append or Make-table

Is there a way to open an Append or Make-table query in Design view without invoking the source query?

View 1 Replies View Related

UNION Query MS Jet Database Engine Cannot Find The Input Table Or Query.

Oct 28, 2005

Hello All,

I'm trying to run a UNION query that joins five queries through a MS WorkSpace into a DAO.recordset in VB. I'm pulling the data from a SQL Server Database through VB in Access. I'm attempting to open a recordset with a query passed to it as a string. The query is below. For some reason, I'm receiving a message: "MS Jet database engine cannot find the input table or query. Runtime Error 3078".

Here's what's puzzling. When I run a single query without any UNION statement, the code finds the table and runs fine without error, but anytime I join two or more queries with a UNION statement in the VB, it gives me the error.

I've executed the same UNION query in both Access Query Builder and SQL Server's Query Analyzer and they work fine in both environments. It's only when I call the query from a DAO.Recodset with VB that it causes this problem. The following is a sample of the UNION query joining two of the five queries. Does anyone have any idea what could be the problem? The following query executes in about 5 seconds so I don't think there's a "time-out" issue. I'm thinking that the UNION statement may be the culprit. Maybe there's another way to approach joining these separate queries? Any help would be most appreciated. Thanks.

SELECT SalespersonID, Sum([SlsPrice]-[RtnPrice]-[SlsDiscnt]+[RtnDiscnt]) AS fldPrice FROM MyTable WHERE (((Source)='d') AND ((DistrictID)='01') AND ((CategoryID) = 'HCPROD') AND ((BrandID)<>'CSS')) AND (((BrandID)<>'1356')) AND (((BrandID)<>'1400')) AND (((BrandID)<>'1551')) AND (((BrandID)<>'555')) AND (((BrandID)<>'66'))
AND (TransDate >= 07/01/2005) AND (TransDate <= 07/31/2005) GROUP BY SalespersonID
UNION
SELECT SalespersonID, Sum([SlsPrice]-[RtnPrice]-[SlsDiscnt]+[RtnDiscnt]) AS fldPrice FROM MyTable WHERE (((Source)='d') AND ((DistrictID)='01') AND ((ProductID) = '0029800')) AND (TransDate >= 07/01/2005) AND (TransDate <= 07/31/2005) GROUP BY SalespersonID

Set wrkJet = CreateWorkspace("", "pw", "", dbUseJet)
Set db = wrkJet.OpenDatabase("DW", _
dbDriverNoPrompt, True, _
"ODBC;DATABASE=DW;DSN=DW2")
'Set rs1 = db.OpenRecordset(strSQL)

View 9 Replies View Related

Queries :: Export Query To Excel Then Delete Query Data From Table

Nov 20, 2013

I am wondering if there is a quicker way to export a query to excel then have the data in that query removed from the original table. (effectively cutting the data from the table and exporting to excel)

I understand that this can be done by exporting the query to excel then running the same query as a delete query to remove the data but I just wondered if this is the most efficient way.

I have experience of VB in excel but currently only use the basic macro builder in Access though if Access VB is more efficient I can easily learn.

View 5 Replies View Related

Queries :: Update A Query Based On Results From Another Query Using Count Function

Apr 2, 2013

I run a physical therapy office and patients come in for treatment either 3, 4 or 5 times per week. My database is used to track these frequencies (among other things).

I have 3 queries which count how many patients come in 5, 4 and 3 times/week.

In my main table I have fields called "how many 5's", "how many 4's" and "how many 3's".

I have tried to design an update query which will update those fileds in my main table to reflect the counts in the 3 queries mentioned above.

(I'm not using SQL view, I'm using the query design view)

In the "update to:" row, I use the Build function and locate the count I'm looking for.

Problem: when I run the query I get the error: Operation must use an updateable query.

View 3 Replies View Related

Queries :: Crsosstab Query Doesn't Recognize Expression In Source Query

Aug 12, 2015

I have a query where these are the fields:

ProductRevType
RevLag
RevFlowThru
CloseMoYr
ProjRevDate
CurrentMRC
ProjRevMRC

The ProjRevMRC field is an expression that reads:ProjRevMRC: IIf([ProjRevDate]>=DateSerial(Year(Date()),Month(Date()),1),[CurrentMRC]*[qry303a_ SFADetailMRC_ONLY]![Rev Flow Through],0)

When I run the query, it works perfectly, but when I created a crosstab query to show totals by month, I wanted the totals to be zero for the months less than the current month. Is there a way for the crosstab query to execute the expression and put zeroes for those months?

View 4 Replies View Related

Queries :: How To Insert A Prompt For Number In A Query To Calculate Against Another Field In Query

Jul 15, 2014

I have a field that is giving me the number of business days between a period of time and then I want to subtract that number - the person's PTO time to see the actual days they were available...when I simply type the number in (see below) it works great but I want to set up a prompt that will ask me how many PTO Days to calculate as it will be different for each person I am quering...is this possible?

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved