1
vote
1answer
26 views

Translating a query from MS Access to SQL Server

I have a legacy query from years ago that was written for an MS Access backend: DELETE category.* FROM category LEFT JOIN product_category ON category.id = product_category.categoryid ...
0
votes
0answers
29 views

SQL query to return a column per date in date range with sum of contract utilisations (value/duration)

My question is similar but more elaborate than another already in stackexchange.com "SQL query to return a column per date in date range?" I have the following data: Customer Start_date ...
0
votes
1answer
51 views

How to shift a value one record 'down'

Suppose we have a field ("Flag"). How we can shift records of this flag in another field ("ShiftField") by using SQL code? See the example: ID Flag ShiftFlag 1 0 2 1 0 3 1 ...
0
votes
1answer
39 views

Ms Access SQL problem

in this table Customer is actually storing CUSID (i have pleased the caption customer and made it display the name to which the CUSID corresponds to) now in the CUSnum field i want it to ...
0
votes
0answers
20 views

How can I number my groups using an Access “Find Duplicates” Query?

I have a query created by the MS Access 2010 find duplicates wizard. It is: SELECT * FROM fbExpenses WHERE [expense_date] In (SELECT [expense_date] FROM [fbExpenses] As ...
-2
votes
6answers
250 views

Missing import function in SQL Developer like MS Access has

At my work we used to use MS Access now we are forced to use SQL developer to create queries and export the data. Details: We can only query to the database We cannot create a new database We use ...
0
votes
0answers
24 views

Combine a running balance SQL statement as a column

I have two Select Statements which are collecting data from 1 table, one is a totals select statement. Could anyone assist me with combining them into 1 statement? Any assistance is appreciated ...
0
votes
2answers
49 views

Separating a date column in Access into Month, Day and Year while keeping the new columns ordered by a seperate column(primary key)

I have a column titled DateOpen which lists the date files were opened in d/m/yyyy format. I want to split the entries in that column into new columns titled MonthOpen, DayOpen and YearOpen while ...
0
votes
1answer
83 views

SQL Query: Join Tables using two partial string matches

Using MS Access, I have to combine two tables where two criteria must be met: Container = Container AND Booking = Booking. I have two tables where fields are missing a value: Table1 and Table2 have ...
0
votes
0answers
45 views

Attendance Database using sql in MS Access

I'm currently working with a simple database for the attendance of the professor in our college. I'm using MS Access 2010 with a Main table that includes the Attendance log of all the professor with ...
0
votes
1answer
29 views

Access: search for more than one parameter?

I need to perform several queries, looking for more than one parameter. for example: in my field "lenght" I want to extract values matching both 4.6 and 4.7. then, next time I need 5.8 and 5.9, and ...
1
vote
1answer
121 views

Query Multiple tables in MS Access

I have three tables: Table City has Two columns: City_ID, CityName <City_ID is Primary Key> Table Accommodation has Two Columns: Accommodation_ID, CategoryType <Accommodaton_ID is ...
3
votes
1answer
51 views

How to check with SQL whether a column is an identity column for an Access database?

Knowing how to check whether a column is an identity column for Microsoft SQL Server, I currently still found no solution for doing the same with SQL for a Microsoft Access database. My question: ...
1
vote
1answer
87 views

Merge Fields into one Row with a Query

I am working with Microsoft Office Professional Plus 2010. What I am trying to figure out is how to merge all characters for each DOMAIN field into one row, for example: Q01 ...
0
votes
1answer
56 views

Handling empty fields

SELECT Name, SUM(Switch([Date] = DateAdd('d', - 7, DATE ()), NetAmount) )AS DAY1 FROM Customer GROUP BY Name My question is how to return the value 0 when the date is not present (an empty field). ...
1
vote
1answer
300 views

Convert SQL Server query to MS Access syntax

I have this query in SQL Server: SELECT Dated, AccountID, AccountName, Rate, case (when (Credit-Debit) > 0 then Credit-Debit END) as Credit, case (when (Credit-Debit) < 0 then Credit-Debit ...
1
vote
0answers
97 views

SET IDENTITY_INSERT equivalent in Access

In sql server i can explicitly insert value to a identity column of a table by using SET IDENTITY_INSERT ON . For an Access database i am using Autonumber column datatype. For this column i am not ...
0
votes
1answer
271 views

Grouping and counting rows by existence of matching criteria in any of several columns

Disclaimer: I've inherited a database which is probably not quite as "normal" as I would like, and I'm limited to Jet/MS Access 2010 for my db backend and interface, as well my choice of reporting ...
1
vote
0answers
44 views

A pre-existing hierarchial table as relational

Currently the database contains something like so (these are the main fields but there's a large amount more): +----------+----------------+----------+ | Agency | parent | main_term ...
0
votes
0answers
115 views

Multiple Column Lookup field from Access 2010 to Sharepoint 2010

I have two fields called "Tool ID" and "Tool Name" in my main "Tools" table in Access. "Tool ID" is set as the primary key in that it gives each tool a unique autogenerated number. When I create a ...
0
votes
1answer
47 views

Get Maximum Value

I am using MS Access database. I have a table (Proposal) with the following properties: ProposalID - PK, Title, RequestedAmount, ResearcherID - FK I want to run an SQL query to get the candidate that ...
0
votes
0answers
41 views

Performance Slow After CompactRepair Access

I am performing a large number of insert operations using VBA - Access. the VBA code is in a file "control.accdb" performing operations on "data.accdb" Few tables in the process are created from the ...
0
votes
0answers
107 views

How to update column value in MS-Access by comparing two columns?

I have an Access 2000 table with 10 fields. I want to compare the 2 column and update the third one. To elaborate : keyfield cno entno uno (Text) (Text) (int) (int) ...
0
votes
2answers
78 views

How to write a script to push the server time to out?

Background: I am programming a database in Ms-Access and using SQL-server as the Back-end. But since my database will be a multi-user platform I need to make sure that whenever a user is posting data ...
2
votes
3answers
468 views

Database Design Relationship for Patient Visit in MS Access

I am designing a database to store records for research purposes, and I am having trouble picturing how I can create a relational database based on the information I have. There are a total of 6 ...
1
vote
1answer
150 views

Database Relational Design for Multiple Categories

I am building a database for participants who are grouped into studies. There's a total of 5 different studies - A, B, C, D, and E. The participants may be in more than one studies, and participants ...
1
vote
1answer
78 views

What is a proper way to handle a “sequence number” like field?

The fields of a trimmed-down version of a database I'm working with looks like this: Model Number, Model Name, Customer, Date, SeqNum The customer can purchase the exact same item on the same date ...
3
votes
1answer
436 views

Removing duplicates from a query with conditions in Access 2007

I have a table of transactions with 880,095 records that I am querying. There are duplicate Transaction ID's in the table that I would like hidden/removed when querying the table. Eg 1. ...
2
votes
1answer
3k views

Joining 3 tables using SQL Query?

I'm having problems joining three tables. It works well when I use the same query for joining two tables (after removing LEFT OUTER JOIN C ON B.No = C.No). However, it doesn't work when I use three ...
0
votes
1answer
717 views

Access query to select multiple records with matching field

I have a table with a list of people ([FirstName], [Surname], [Age]). Some of these people are in the same family. I'd like to return a list of people who have another family member in the table (same ...
0
votes
0answers
28 views

Duplicate Customer Records for SQL Query from ODBC with Joins and Group Bys [duplicate]

Possible Duplicate: SQL Query with ODBC, Joins and Group Bys I am getting duplicate customer records with the query below. The main purpose of the query is to pull a list of customers into ...
3
votes
5answers
461 views

SQL Query with ODBC, Joins and Group Bys

I am having issues with the statement below. The main purpose of the query is to pull a list of customers into an Access db from ODBC (our customers are stored in DB2 on IBM i). The query is ...
3
votes
1answer
255 views

How can I conditionally summarize multiple rows in Microsoft Access?

I have a table of data, in Microsoft Access 2003, listing multiple rows for each person. I want to conditionally summarize a subset of these rows for each person, for instance, if entry for columnA = ...
1
vote
1answer
560 views

Unable to add records to query in Access 2007

I've found this excellent resource that covers why a query might be read-only. I have a query that is not read only, yet I'm unable to add new records to it. There are three tables. Let's call them ...
0
votes
1answer
836 views

Access 2007 sql editor

Is there an ACCESS 2007 JET SQL editor or client (not sure the right term is) that can be used to code Access Jet SQL queries? It is very difficult to write SQL queries in ACCESS 2007 since it's like ...
0
votes
1answer
494 views

Select DISTINCT records with extra information

I have a MS Access database full of customer names and addresses. I want to send out a mailing but only one per address. Therefore if there are 3 different customers at the address I want only one ...
0
votes
2answers
821 views

Is it possible to join derived tables to actual in Access 2007

Is it possible to join derived tables to actual tables in Access 2007 like in SQL Server 2008? I have an example below: SELECT * FROM --MyOtherTable is a "real" table MyOtherTable ...
6
votes
5answers
3k views

What is the easiest way to get started using databases with real data?

I have a project that could benefit from using a database, but I have no experience with databases, don't have access to a server, and have relatively little experience working with things living ...
1
vote
1answer
66 views

Rename cell based on duplicate compound key in MS Access

I'm using MS Access (I know, I know...), and I'm trying to rename a cell when there are duplicates of mutliple columns. Here's an example: Col_1 Col_2 Col_3 Note A1 B1 C1 A1 ...
3
votes
3answers
114 views

~15 data sets w/ 25k rows & ~20 columns + quick one time reports = Access VS SQL?

I am working with around 10-15 datasets each containing around 25,000 rows and around 20 columns. Data is text in name/adress/desc and the rest numbers. I need to be able to calculate certain fields, ...
2
votes
5answers
9k views

Full Outer Join in MS Access

I have two staff lists: List A: StaffID Supervisor ==================== 0001234 NULL 0001235 0001234 0001237 0001234 0001239 0001237 and List B: StaffID Supervisor ...
5
votes
3answers
518 views

Querying special characters

I work with language with special characters (example: e -> é). I have a query with a LIKE but when I search a word with special char and my query doesn't have the special char, I don't get the ...
6
votes
3answers
927 views

Query best possible matches and order them

I'm trying to write a query along these lines: select * from tbl where col1 = 1 and col2 = 2 and col3 = 3 order by ... ; I want first all the results where all 3 WHERE ...
1
vote
2answers
672 views

Access exporting to CSV is weirdly slow

I have searched but could not find anything similar. If I just run the query, I can get the result pretty quickly (~5 mins); but after I saved the query to export as CSV, the exporting part is ...
-6
votes
1answer
850 views

How do I convert this Access query for SQL Server? [closed]

I have a Query used in Access which does not work in SQL Server as it stands: SELECT mstPatient.PatientID, mstPatient.PatientID AS PKNO, ...
6
votes
3answers
387 views

Online resource for writing Access SQL statements

I am looking for an online resource for writing Access SQL statements. I write queries using SQL because the UI puts limitations on what can be queried. I have been using w3schools for reference, ...