473,692 Members | 2,105 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help with query...

296 Recognized Expert Contributor
Hey guys,
I have been mulling over this problem for a few days and have yet to come up with a query that will give me the expected results. I am working on a database that stores employee information, and my boss has asked me to add a component that will keep track of job vacancies as well.
I have 6 tables that are all linked:

Table: Employee
1. ID; Text; PK
2. ... (the rest are irrelevant to the query)

Table: EmplStatus (linked to Employee.ID)
1. EmployeeID; Text; PK
2. Date; Date/Time; PK
3. StatusCode; Text
4. Active; Yes/No

Table: EmplOrganizatio n (linked to Employee.ID)
1. EmployeeID; Text; PK
2. Date; Date/Time; PK
3. DepartmentCode; Text
4. DivisionCode; Text
5. Active; Yes/No

Table: EmplJob (linked to Employee.ID and Job.Code)
1. EmployeeID; Text; PK
2. Date; Date/Time; PK
3. JobCode; Text
4. Active; Yes/No

Table: Job
1. Code; Text; PK
2. Title; Text
3. ...(the rest are irrelevant to query)

Table: JobVacancy (linked to Job.Code)
1. JobCode; Text; PK
2. DepartmenCode; Text; PK
3. DivisionCode; Text; PK
4. NumberofPositio ns; Number

Now, what I'm trying to do is create a query that will show me all of the jobs in the job table, JobVacancy.Numb erofPositions for each job, all employees associated with that particular job title in a particular department/division. For example, I may have 20 Area Engineers, where 5 are in Department: A, Division: X, 10 are in Department: B, Division: Y, and 5 are in Department: A, Division: Z. Some critera is: EmplStatus.Acti ve=True, EmplJob.Active= True, EmplOrganizatio n.Active=True, EmplStatus.Stat usCode='A'.
The end result that I'm looking for is a list of all employees and their job code, department, and division. The closest result that I have gotten leaves out 5 of the employees and I can't figure out why. The reason for needing the employee ID's in my query is so that I can do a count of how many employees are in each department/division with a certain job title, so that I can subtract that from the Number of Positions, in order to determine how many vacancies there are. Here is my current SQL code:

Expand|Select|Wrap|Line Numbers
  1. SELECT DISTINCT Employee.ID, EmplJob.EmployeeID, EmplJob.JobCode, EmplOrganization.DepartmentCode, EmplOrganization.DivisionCode, EmplStatus.StatusCode, Department.Desc, Division.Desc, JobVacancy.NumberofPositions, JobVacancy.DepartmenCode
  2. FROM (Job RIGHT JOIN (Department RIGHT JOIN (((Employee LEFT JOIN EmplJob ON Employee.ID = EmplJob.EmployeeID) LEFT JOIN (Division RIGHT JOIN EmplOrganization ON Division.Code = EmplOrganization.DivisionCode) ON Employee.ID = EmplOrganization.EmployeeID) LEFT JOIN EmplStatus ON Employee.ID = EmplStatus.EmployeeID) ON Department.Code = EmplOrganization.DepartmentCode) ON Job.Code = EmplJob.JobCode) LEFT JOIN JobVacancy ON Job.Code = JobVacancy.JobCode
  3. WHERE (((Employee.ID)=[EmplJob].[EmployeeID]) AND ((EmplJob.JobCode) Is Not Null) AND ((EmplStatus.StatusCode)='A') AND ((JobVacancy.DepartmenCode)=[EmplOrganization].[DepartmentCode]) AND ((JobVacancy.DivisionCode)=[EmplOrganization].[DivisionCode]) AND (([EmplStatus.Active])=True) AND (([EmplOrganization.Active])=True) AND (([EmplJob.Active])=True)) OR (((Employee.ID)=[EmplJob].[EmployeeID]) AND ((EmplJob.JobCode) Is Not Null) AND ((EmplOrganization.DepartmentCode) Is Null) AND ((EmplOrganization.DivisionCode) Is Null) AND ((EmplStatus.StatusCode)='A') AND ((JobVacancy.DepartmenCode) Is Not Null) AND ((JobVacancy.DivisionCode) Is Not Null) AND (([EmplStatus.Active])=True) AND (([EmplOrganization.Active])=True) AND (([EmplJob.Active])=True)) OR (((Employee.ID)=[EmplJob].[EmployeeID]) AND ((EmplJob.JobCode) Is Not Null) AND ((EmplOrganization.DepartmentCode) Is Not Null) AND ((EmplOrganization.DivisionCode) Is Not Null) AND ((EmplStatus.StatusCode)='A') AND ((JobVacancy.DepartmenCode) Is Null) AND ((JobVacancy.DivisionCode) Is Null) AND (([EmplStatus.Active])=True) AND (([EmplOrganization.Active])=True) AND (([EmplJob.Active])=True)) OR (((Employee.ID)=[EmplJob].[EmployeeID]) AND ((EmplJob.JobCode) Is Not Null) AND ((EmplOrganization.DepartmentCode) Is Null) AND ((EmplOrganization.DivisionCode) Is Null) AND ((EmplStatus.StatusCode)='A') AND ((JobVacancy.DepartmenCode) Is Null) AND ((JobVacancy.DivisionCode) Is Null) AND (([EmplStatus.Active])=True) AND (([EmplOrganization.Active])=True) AND (([EmplJob.Active])=True)) OR (((EmplJob.JobCode) Is Not Null) AND ((EmplOrganization.DepartmentCode) Is Not Null) AND ((EmplStatus.StatusCode)='A') AND ((JobVacancy.DepartmenCode) Is Null) AND ((JobVacancy.DivisionCode)=[EmplOrganization].[DivisionCode]) AND (([EmplStatus.Active])=True) AND (([EmplOrganization.Active])=True) AND (([EmplJob.Active])=True)) OR (((EmplJob.JobCode) Is Not Null) AND ((EmplOrganization.DivisionCode) Is Null) AND ((EmplStatus.StatusCode)='A') AND ((JobVacancy.DepartmenCode)=[EmplOrganization].[DepartmentCode]) AND ((JobVacancy.DivisionCode) Is Not Null) AND (([EmplStatus.Active])=True) AND (([EmplOrganization.Active])=True) AND (([EmplJob.Active])=True)) OR (((EmplJob.JobCode) Is Not Null) AND ((EmplOrganization.DepartmentCode) Is Null) AND ((EmplOrganization.DivisionCode) Is Not Null) AND ((EmplStatus.StatusCode)='A') AND ((JobVacancy.DepartmenCode) Is Not Null) AND ((JobVacancy.DivisionCode) Is Null) AND (([EmplStatus.Active])=True) AND (([EmplOrganization.Active])=True) AND (([EmplJob.Active])=True)) OR (((EmplJob.JobCode) Is Not Null) AND ((EmplOrganization.DepartmentCode) Is Null) AND ((EmplOrganization.DivisionCode) Is Not Null) AND ((EmplStatus.StatusCode)='A') AND ((JobVacancy.DepartmenCode) Is Null) AND ((JobVacancy.DivisionCode) Is Null) AND (([EmplStatus.Active])=True) AND (([EmplOrganization.Active])=True) AND (([EmplJob.Active])=True)) OR (((EmplJob.JobCode) Is Not Null) AND ((EmplOrganization.DepartmentCode) Is Null) AND ((EmplStatus.StatusCode)='A') AND ((JobVacancy.DepartmenCode) Is Not Null) AND ((JobVacancy.DivisionCode)=[EmplOrganization].[DivisionCode]) AND (([EmplStatus.Active])=True) AND (([EmplOrganization.Active])=True) AND (([EmplJob.Active])=True)) OR (((EmplJob.JobCode) Is Not Null) AND ((EmplOrganization.DepartmentCode) Is Not Null) AND ((EmplOrganization.DivisionCode) Is Null) AND ((EmplStatus.StatusCode)='A') AND (([EmplStatus.Active])=True) AND (([EmplOrganization.Active])=True) AND (([EmplJob.Active])=True)) OR (((EmplJob.JobCode) Is Not Null) AND ((EmplOrganization.DepartmentCode) Is Null) AND ((EmplOrganization.DivisionCode) Is Not Null) AND ((EmplStatus.StatusCode)='A') AND (([EmplStatus.Active])=True) AND (([EmplOrganization.Active])=True) AND (([EmplJob.Active])=True))
  4. ORDER BY EmplJob.JobCode, EmplOrganization.DepartmentCode, EmplOrganization.DivisionCode;
If anyone can help me to try get the query to display the expected results I'd appreciate it. The problem I'm having is making sure that the employee ID only shows up once in the query result - I need the employee to only show up with the job code, department and division that they are associated with. I am having troubles where some job codes might be associated with more than one department and division - in those cases, I have had results where an employee ID will show up the same number of occurrences as there are different department/divisions associated with the job code. I hope someone can make sense of this and try to help me out! Thanks!
Jul 23 '07 #1
23 2781
mlcampeau
296 Recognized Expert Contributor
Okay, I'll try to simplify this a bit more. The following query gives me the expected results in regards to the employees in the database:
Expand|Select|Wrap|Line Numbers
  1. SELECT DISTINCT Employee.ID, EmplJob.EmployeeID, EmplJob.JobCode, EmplOrganization.DepartmentCode, EmplOrganization.DivisionCode, EmplStatus.StatusCode, Department.Desc, Division.Desc
  2. FROM (Job RIGHT JOIN (Department RIGHT JOIN (((Employee LEFT JOIN EmplJob ON Employee.ID = EmplJob.EmployeeID) LEFT JOIN (Division RIGHT JOIN EmplOrganization ON Division.Code = EmplOrganization.DivisionCode) ON Employee.ID = EmplOrganization.EmployeeID) LEFT JOIN EmplStatus ON Employee.ID = EmplStatus.EmployeeID) ON Department.Code = EmplOrganization.DepartmentCode) ON Job.Code = EmplJob.JobCode) LEFT JOIN JobVacancy ON Job.Code = JobVacancy.JobCode
  3. WHERE (((EmplJob.JobCode) Is Not Null) AND ((EmplStatus.StatusCode)="A") AND (([EmplStatus.Active])=True) AND (([EmplOrganization.Active])=True) AND (([EmplJob.Active])=True))
  4. ORDER BY EmplJob.JobCode, EmplOrganization.DepartmentCode, EmplOrganization.DivisionCode;
This gives me one record for each employee who is assigned a job title. As soon as I add JobVacancy.Numb erofPositions to the SELECT clause, my 611 results turns into 983 results because if there is a job that is in more than one department or division, an employee associated with that job will show up for each department/division. For example - a Divisional Accountant can be in Department A, Division X, or Department A, Division Y, or Department A, Division Z. I have 2 positions for division X, 6 positions for division y, and 9 positions for division Z. Therefore, Employee 1234 who is actually in Department A, Division X, will also show up under Division Y and Division Z, which is incorrect. If I try WHERE (JobVacancy.Div isionCode)=(Emp lOrganization.D ivisionCode), that won't work either, because there are cases where there is a position available, but no employees are assigned to it, so it won't show up in the query in that case. Anyone have any ideas??
Jul 24 '07 #2
mlcampeau
296 Recognized Expert Contributor
any help would be appreciated.... .
Jul 24 '07 #3
Rabbit
12,516 Recognized Expert Moderator MVP
Perhaps you should break this down into multiple queries first and get each of those working. It's hard to follow the logic right now.
Jul 25 '07 #4
mlcampeau
296 Recognized Expert Contributor
Perhaps you should break this down into multiple queries first and get each of those working. It's hard to follow the logic right now.
I've tried breaking it into 2 queries:
MY - JobVacancies
Expand|Select|Wrap|Line Numbers
  1. SELECT JobVacancy.JobCode, JobVacancy.DepartmenCode, JobVacancy.DivisionCode, JobVacancy.NumberofPositions
  2. FROM JobVacancy
  3. ORDER BY JobVacancy.JobCode, JobVacancy.DepartmenCode, JobVacancy.DivisionCode;
and MY - ActiveEmpJobs
Expand|Select|Wrap|Line Numbers
  1. SELECT Employee.ID, EmplJob.JobCode, EmplOrganization.DepartmentCode, EmplOrganization.DivisionCode, EmplStatus.StatusCode
  2. FROM Job RIGHT JOIN (Department RIGHT JOIN (((Employee LEFT JOIN EmplJob ON Employee.ID = EmplJob.EmployeeID) LEFT JOIN (Division RIGHT JOIN EmplOrganization ON Division.Code = EmplOrganization.DivisionCode) ON Employee.ID = EmplOrganization.EmployeeID) LEFT JOIN EmplStatus ON Employee.ID = EmplStatus.EmployeeID) ON Department.Code = EmplOrganization.DepartmentCode) ON Job.Code = EmplJob.JobCode
  3. GROUP BY Employee.ID, EmplJob.JobCode, EmplOrganization.DepartmentCode, EmplOrganization.DivisionCode, EmplStatus.StatusCode, [EmplStatus.Active], [EmplOrganization.Active], [EmplJob.Active]
  4. HAVING (((EmplJob.JobCode) Is Not Null) AND ((EmplStatus.StatusCode)='A') AND (([EmplStatus.Active])=True) AND (([EmplOrganization.Active])=True) AND (([EmplJob.Active])=True))
  5. ORDER BY EmplJob.JobCode, EmplOrganization.DepartmentCode, EmplOrganization.DivisionCode;
Each query gives the expected results - the first lists all jobs in the JobVacancy table, the dept, div, and # of positions
1. Accountant; Business Services; Accounts Payable; 5
2. Accountant; Business Services; Timb Support; 4
3. Engineer; Timb; CRR; 3
4. Engineer; Timb; WRR; 6
etc.
The second query lists all Active employeeIDs, their job, department, division
1. 1234; Accountant; Business Services; Accounts Payable
2. 2345; Accountant; Business Services; Accounts Payable
3. 3456; Accountant; Business Services; Timb Support
etc.
What I'm trying to do now, is to create a query that will basically combine these two queries. I want it to show all Job Titles in the database (so all jobs in the first query - there isn't necessarily a related record in the second query), all departments and divisions associated with that job (once all data is entered correctly, it should be all the departments and divisions in the first query, but there are cases where an employee has a job title in a particular department or division, but that position is not entered in the Job Vacancy table or the position is, but not associated with that department or division (i.e. looking at above example - an employee may be an Engineer, in Timb, at NVIR - which is not a record in the job vacancy table)). I also want it to show the number of positions. I don't care if the query produces a record for each individual employee (there will be cases where there are jobs in the job vacancy table, but no employees are associated with that position because it is a vacant position), or if the query does a count of the number of employees with that position in that particular department and division.
So my result would be :
EmpID; Job; Dept; Div; #Positions
1. 1234; Accountant, Business Services, Accounts Payable; 5
2. 2345; Accountant, Business Services; Accounts Payable; 5
3. 3456; Accountant, Business Services, Timb Support; 4
etc.
The problem I'm having is that I'm getting results like:
1. 1234; Accountant, Business Services, Accounts Payable; 5
2. 1234; Accountant, Business Services, Timb Support; 4
3. 2345; Accountant, Business Services, Accounts Payable; 5
4. 2345; Accountant, Business Services, Timb Support; 4
5. 3456; Accountant, Business Services, Accounts Payable; 5
6. 3456; Accountant, Business Services, Timb Support; 4

I'm sorry it's so confusing!!! I'm trying my best to explain it in a way that you can understand. Anymore questions, let me know!
Jul 25 '07 #5
RZ15
53 New Member
I'm no expert and I can't read the joins in your SQL, but it seems there is something wrong with the join you have between the employee table and the emplJob table. It looks like the join should be an inner join between the PK and FK for employee ID between the two tables (EDIT: or maybe an outer join from the jobs table to the employees so it will return jobs that are vacant).

I would suggest doing what Rabbit said. Try doing a query in which you pull the Employee ID, division code and department code. Get the join on that to be correct and give you the desired results, and then build off that.

EDIT: I think I misunderstood, in which case my post will not help you.
Jul 25 '07 #6
mlcampeau
296 Recognized Expert Contributor
I'm no expert and I can't read the joins in your SQL, but it seems there is something wrong with the join you have between the employee table and the emplJob table. It looks like the join should be an inner join between the PK and FK for employee ID between the two tables.

I would suggest doing what Rabbit said. Try doing a query in which you pull the Employee ID, division code and department code. Get the join on that to be correct and give you the desired results, and then build off that.
I just posted the queries in which the desired results are given in the post above yours. It doesn't let me change the join that you suggested. I built the query is design view, rather than writing the sql myself, so I'm not sure that that is the problem (although I'm really no expert!!)
Jul 25 '07 #7
Rabbit
12,516 Recognized Expert Moderator MVP
I've tried breaking it into 2 queries:
MY - JobVacancies
Expand|Select|Wrap|Line Numbers
  1. SELECT JobVacancy.JobCode, JobVacancy.DepartmenCode, JobVacancy.DivisionCode, JobVacancy.NumberofPositions
  2. FROM JobVacancy
  3. ORDER BY JobVacancy.JobCode, JobVacancy.DepartmenCode, JobVacancy.DivisionCode;
and MY - ActiveEmpJobs
Expand|Select|Wrap|Line Numbers
  1. SELECT Employee.ID, EmplJob.JobCode, EmplOrganization.DepartmentCode, EmplOrganization.DivisionCode, EmplStatus.StatusCode
  2. FROM Job RIGHT JOIN (Department RIGHT JOIN (((Employee LEFT JOIN EmplJob ON Employee.ID = EmplJob.EmployeeID) LEFT JOIN (Division RIGHT JOIN EmplOrganization ON Division.Code = EmplOrganization.DivisionCode) ON Employee.ID = EmplOrganization.EmployeeID) LEFT JOIN EmplStatus ON Employee.ID = EmplStatus.EmployeeID) ON Department.Code = EmplOrganization.DepartmentCode) ON Job.Code = EmplJob.JobCode
  3. GROUP BY Employee.ID, EmplJob.JobCode, EmplOrganization.DepartmentCode, EmplOrganization.DivisionCode, EmplStatus.StatusCode, [EmplStatus.Active], [EmplOrganization.Active], [EmplJob.Active]
  4. HAVING (((EmplJob.JobCode) Is Not Null) AND ((EmplStatus.StatusCode)='A') AND (([EmplStatus.Active])=True) AND (([EmplOrganization.Active])=True) AND (([EmplJob.Active])=True))
  5. ORDER BY EmplJob.JobCode, EmplOrganization.DepartmentCode, EmplOrganization.DivisionCode;
Each query gives the expected results - the first lists all jobs in the JobVacancy table, the dept, div, and # of positions
1. Accountant; Business Services; Accounts Payable; 5
2. Accountant; Business Services; Timb Support; 4
3. Engineer; Timb; CRR; 3
4. Engineer; Timb; WRR; 6
etc.
The second query lists all Active employeeIDs, their job, department, division
1. 1234; Accountant; Business Services; Accounts Payable
2. 2345; Accountant; Business Services; Accounts Payable
3. 3456; Accountant; Business Services; Timb Support
etc.
What I'm trying to do now, is to create a query that will basically combine these two queries. I want it to show all Job Titles in the database (so all jobs in the first query - there isn't necessarily a related record in the second query), all departments and divisions associated with that job (once all data is entered correctly, it should be all the departments and divisions in the first query, but there are cases where an employee has a job title in a particular department or division, but that position is not entered in the Job Vacancy table or the position is, but not associated with that department or division (i.e. looking at above example - an employee may be an Engineer, in Timb, at NVIR - which is not a record in the job vacancy table)). I also want it to show the number of positions. I don't care if the query produces a record for each individual employee (there will be cases where there are jobs in the job vacancy table, but no employees are associated with that position because it is a vacant position), or if the query does a count of the number of employees with that position in that particular department and division.
So my result would be :
EmpID; Job; Dept; Div; #Positions
1. 1234; Accountant, Business Services, Accounts Payable; 5
2. 2345; Accountant, Business Services; Accounts Payable; 5
3. 3456; Accountant, Business Services, Timb Support; 4
etc.
The problem I'm having is that I'm getting results like:
1. 1234; Accountant, Business Services, Accounts Payable; 5
2. 1234; Accountant, Business Services, Timb Support; 4
3. 2345; Accountant, Business Services, Accounts Payable; 5
4. 2345; Accountant, Business Services, Timb Support; 4
5. 3456; Accountant, Business Services, Accounts Payable; 5
6. 3456; Accountant, Business Services, Timb Support; 4

I'm sorry it's so confusing!!! I'm trying my best to explain it in a way that you can understand. Anymore questions, let me know!
Your results come out that way because you're trying to join an individual level query with an aggregate query. So you get the aggregate results for each individual, they're meant to be separate.

So my question is what is the end result you're looking for.
Jul 25 '07 #8
mlcampeau
296 Recognized Expert Contributor
The end result I'm looking for would be a list of every job code in the job vacancy table, along with the department, and division, and number of positions (just like the MY - JobVacancies query), with another column showing a count of the number of employees with that job code, department and division, that way I can do a calculation to determine how many vacancies are available for each position, and where the position is (department and division).
Jul 25 '07 #9
mlcampeau
296 Recognized Expert Contributor
Would changing MY - ActiveEmpJobs to
Expand|Select|Wrap|Line Numbers
  1. SELECT Employee.ID, EmplJob.JobCode, EmplOrganization.DepartmentCode, EmplOrganization.DivisionCode, EmplStatus.StatusCode
  2. FROM Job RIGHT JOIN (Department RIGHT JOIN (((Employee LEFT JOIN EmplJob ON Employee.ID = EmplJob.EmployeeID) LEFT JOIN (Division RIGHT JOIN EmplOrganization ON Division.Code = EmplOrganization.DivisionCode) ON Employee.ID = EmplOrganization.EmployeeID) LEFT JOIN EmplStatus ON Employee.ID = EmplStatus.EmployeeID) ON Department.Code = EmplOrganization.DepartmentCode) ON Job.Code = EmplJob.JobCode
  3. WHERE (((EmplJob.JobCode) Is Not Null) AND ((EmplStatus.StatusCode)='A') AND (([EmplStatus.Active])=True) AND (([EmplOrganization.Active])=True) AND (([EmplJob.Active])=True))
  4. ORDER BY EmplJob.JobCode, EmplOrganization.DepartmentCode, EmplOrganization.DivisionCode;
make it a non-aggregate query? Because this gives the same results as the query I stated above. (I just removed the Group By clause) Would this make it easier to combine the two to get the desired results?
Jul 25 '07 #10

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

Similar topics

1
3665
by: compusup3000 | last post by:
Hi, I have an orders database and I need to be able to write a query that groups sales by: 1. Date 2. Time of day (both am and pm) I currently have a date/time field named "Submitted" that stores just the date.
1
2380
by: MK Randall | last post by:
We're losing a Sybase datasource and need to pull from an identical DB2 database until the SQL Server becomes available later on this year. If someone could read through the query and let me know what is wrong with it, your assistance would be greatly appreciated. The error message I receive is(this comes from SQL): Package Error Error Source: Microsoft OLE DB Provider for ODBC Drivers
1
330
by: Lumpierbritches | last post by:
I'm trying to pull all the parents of a particular animal and I have my SQL statement that says not supported and when I attempt to run the Query, I get The SQL statement couldn't be executed because it contains ambiguous outer joins. To force one of the joins to perform first, create a separate query that performs the first join and then include and then include that query in your SQL statement. Here is the Code: SELECT...
3
1847
by: eddie wang | last post by:
Hello, I am working on an Access database. For some strange reason, my query keeps getting erased by itself. The SQL view of my query object looks like this: SELECT * FROM emp WHERE l_name=forms!frmmain!txtlname; After the query is erased, the query object is still there, but the SQL view is completely blank.
1
1446
by: maurizio.ferracini | last post by:
a student know one ore more programming language in a mask i select from a list_box one or more language and i send ad parameter to a query that extract the student that know all this language. i use something like table: Student,Language,Student- Language
6
1761
by: RDMRDM | last post by:
I have a list box in Access that I have set to allow mulitple choices. Wondering what I need to do to my query in order to pull back the data from the multiple fields. I want to be able to select multiple Lvl1_Organization records from the form. Previously it was a combo box and everything worked. Here is the query I used for the combo box. Like !!
1
1566
by: dbarmer | last post by:
I have a unix database system that hold three tables, 254, 255, 256, and all are linked together by WO, CUST NO, LOC NO. This is for Unix Program Purposes Only. Duplication here is by design. So Up Front I have duplicated data due to a sequence work'd performed. For example. WO 000001 has duplicate WO, CUST, LOC etc... four times because it has four different Work Descriptions. SO, When I transfer these tables to access and create a...
3
3005
by: jambonjamasb | last post by:
Hi I have two tables: email_tbl Data_table Data table is is used to create a Form Data_form
4
1587
by: cephal0n | last post by:
Hi everyone! I've been studying SELECT INTO in vba and made my own. I was successful in generating my own table, strSql = "SELECT * INTO tblTemp49 FROM qryUnq49" conn.Execute strSql now I came accross with a problem. I want to assign an index on my tblTemp49 but my data came from query (qryUnq49) and since query doesn't support this, its been impossible for me to create one. is it possible to assign an idex using vba? and could...
3
1757
by: shankarsunmicrosys | last post by:
Hi, Could you please suggest, how to sort the data coming from a select query in DB2 UDB V8, without having order by clause? My query look like this:
0
8535
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9079
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8954
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8794
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7626
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6458
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4322
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2968
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2234
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.