Hey guys,
I've been trying to write this query that will report multiple counts and keep hitting brick walls. Basically, I can get the counts in individual queries, but I can't find a way to time them together.
My tables are called COURSE and REGISTRATION-INSTRUCTOR. They share a common...
Hey guys,
I am trying to write a query that will return each employee's YTD balance. The problem is in the table, there are multiple YTD balances each one occuring in a specific year and month number. I want to only retrieve the most recent YTD balance. A sample of the table would look like...
Hey guys,
I'm a bit stuck on this problem which should be really simple. I'm trying to find out the percentage between two numbers. For instance:
I have 33,235 total records
I have 5,297 records out of the total that are product A
I want to find out how much percentage of product A is...
...JOIN DSNP.PR01_T_ANTY_PYMT c ON a.MBR_SSN_NBR=c.RECIP_SSN_NBR
WHERE a.AGTY_ID_CD in ('00001', '00005', '00002')
AND NOT EXISTS (SELECT * FROM DSNP.PR01_T_MBR_HIST B WHERE A.MBR_SSN_NBR = B.MBR_SSN_NBR
AND B.AGTY_ID_CD not in ('00001', '00005', '0002') )
AND c.anty_pymt_dt =...
Hey guys,
I'm a bit stuck trying to join two queries so I can get a single report.
Query 1 contains a list of everyone I need on the report. Query 2 shows people's monthly and yearly salary. I was able to do this with derived tables.
The kicker is not everyone in query 1 has a salary so since...
...wall. I can't even get the query to tell only report which screens are occuring in Michele table but not Allison. I tried this query:
select * from michele
where not exists
(SELECT *
FROM michele a,
ALLISON b
WHERE a.USER_TRAN_CD=b.USER_TRAN_CD)
But nothing...
Hey guys,
We've are in a bit of a pickle here at work. We have an Access report that allows users to reprint 1099 forms. Well, the form changed this year, and I've been tasked with editing the report. The problem is the report itself is actually an embedded image file of the 1099 with table...
Hey guys,
I have some raw data that I imported into a spreadsheet and I can't get the number format to convert to the correct currency amount. Here is an example:
The first amount appears like this and is currently set as a text field:
00142465
I need it to convert to $1,424.65. I tried...
UPDATE:
I did some more tinkering, and came closer with this:
SELECT A.SSN,
A.STAT,
B.HISTORY,
B.AGENCY
FROM
(SELECT distinct A.MBR_SSN_NBR AS ssn,
B.MBR_STAT_CD AS stat
FROM DSNP.PR01_T_MBR_HIST A,
DSNP.PR01_T_MBR_SYS B
WHERE...
Hi guys,
I am stuck on what seems like a simple request:
Find all employees who have ever worked in the agency '00401'. Out of that set, also show their current agency number if their status is active.
It is the current employer part that is throwing me off. The way to tell if they are...
Hi guys,
We just upgraded to a new server and SQL 2008. I set up a maintenance plan to backup the main databases and create a transaction log backup. The plans worked fine for 2 weeks, but now I am getting errors. I noticed that the .bak backup files are being created, but it is failing on...
Hey guys,
I have a query that looks for people who are in a certain age range. The query does this by comparing their birth date to the current date. I discovered today the the query is not picking up some people because their birth date is stored in a separate table.
I thought I could do a...
Hey guys,
I am writing a query that returns an employee name field called F_NAME. I need my query to only return employees that have a single letter for their first name. Can someone tell me how to do this? I'm thinking it's some kind of length function, but not finding the solution today...
I am stuck on this one. They want to see a list of people who have service dates occuring before 07-01-1997. I have a field for service date in the table.
The problem is the table contains multiple records for the same person with different service dates. Here is my query:
SELECT...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.