I have a query stored in MS Access which is doing a standard select from an Access table. I would like to add a summary row at the end showing sums for some of the data above.
I have looked at DSum() but it isn't suitable as I would have to include the running total on each row as opposed to just the end.
Also, note that I don't want ...
how to convert result of an select sql query into a new table in msaccess ?
...
Is it possible to set a value to values who is NULL?
The sql I use now is this:
SELECT date
FROM Activity
WHERE date BETWEEN [Forms]![Search]![fromDate] AND [Forms]![Search]![toDate]
But the problem is when there is no value for fromDate or toDate the result is zero rows. So what I want to do is when fromDate is NULL, change the from...
I have two tables, products and categories which have a many to many relationship, so I'm adding a products_categories table which will contain category_id and product_id.
Should I add another (autoincrementing) index column or use the two existing ones as primary key?
...
I have the following query in which I am searching within the XMLData type column.
I want to return a substring of a node that either starts with the search criteria and X number of characters afterward ending on a full word or a substring which places the search criteria in the middle of the result with X number of characters before an...
SELECT id
FROM Activity
WHERE important = see below
IF [Forms]![Search]![important] = false, search for both true and false
IF [Forms]![Search]![important] = true, search for only true
I hope you understand what I want to do. Is this possible?
...
i have created multiple sequential sql query objects for an ms access database. e.g
objectA is named sqlqueryA
and contains the sql code
Select a, b, ........From TableA
objectB is named sqlqueryB
and contains the sql code
Select a, m, n...... From sqlqueryA
objectC is named sqlqueryC
and contains the sql code
Select x, y...
Schema:
radio_bin.id
radio.id
radio.radio_bin -> radio_bin.id
Queries:
select *
from radio_bin
72 rows.
select *
from radio_bin
where id in (select radio_bin from radio)
50 rows.
(And FWIW:)
select distinct radio_bin
from radio
51 rows, including a null.
That's all good. Now:
select *
from radio_bin
...
Hi!
I have two tables:
table1 (about 200000 records)
number varchar(8)
table2 (about 2000000 records)
number varchar(8)
Fields 'number' in both tables have standard indexes.
For each record in table1 there is about 10 records in table2 assigned.
I execute query:
explain select table1.number from table1, table2 where table1.num...
I'm looking to optimized this piece of code. It will process 15000 - 20000 lines. For now I have 9000 lines and it take 30 sec approx. I know string concatenation is slow but I don't know how to do it another way.
//
// Check if composite primary keys existe in database
//
...
If an sqlcommand is executed and times-out, is the respective sqlconnection closed and/or disposed?
Thanks in advance!
...
I have two tables: one contains employees information and another is transactions (sales) information including sales man (employeee ID)
Table 1: employees,code name ...
Table 2: sales, employee_code, product, Date, Price, Amount
I would like to calculate how much each employees can generate revenue (total amount) for each of 2 period...
How can I use the following query:
SELECT *
FROM `laps`
WHERE `id` = (
SELECT `id`
FROM `laps` AS `alt`
WHERE `alt`.`user_id` = `laps`.`user_id`
ORDER BY `lap_time` ASC
LIMIT 1 )
ORDER BY `lap_time` ASC
in my CakePHP app and paginate the results?
...
I am trying to decide if I need to use a view for a particular set of tables. I was wondering if when deleting a row from a view, will it delete the appropriate rows from the base tables that the view was created upon? I am using mysql.
...
Just a simple question, but does the order of your index matter when it spans over multiple columns?
For example, taking the query:
SELECT * FROM my_table WHERE (column_1 = 1 AND column_2 = 2)
If I want to add an index for a query like this, does it matter if my index is created like this:
CREATE INDEX my_index
ON my_table (column...
I'm trying to build a query using HQL and OUTER JOINs and just can't get it work. Consider the following mapping
<class name="Parent">
<id name="id" type="integer">
<generator class="native" />
</id>
</class>
<class name="Child">
<id name="id" type="integer">
<generator class="native" />
</id>
<many-to...
Hi,
I have an Access application where everytime a user enters the application, it makes a temp table for that user called 'their windows login name'_Temp. In one of my reports I need to query using that table, and I can't just make a query and set it as the recourdsource of the report, since the name of the table is always different.
...
I work for a school district. Every year we have to export a list of students from our student management system and send it to a company that handles our online exams.
So to do this export, we had to hire someone who knew the inner workings of our student management system. He wrote an sql (Adaptive Sybase SQL Anywhere) query to export...
I am a code developer, not a DBA, and I tend to get lost with loooong SQL queries, when I use many joins (10 joins is pretty common for me).
I would like to find a Visual SQL Query Builder (free if possible) that could connect to Oracle and see all the tables there, so I would only select visually my keys that link the Joins, and selec...
How to compare groups of tuples in sql: consider the following example:
TABLE T1
--------
GROUP VALUE
----- -----
A FOO
A BAR
X HHH
X ZOO
TABLE T2
--------
GROUP VALUE
----- -----
B ZOO
C FOO
C BAR
I want to write an sql query which compares the groups of values...