The following code gives me an IndexOutOfRange error. ‘Baujahr’ is an integer column in my access-database. cbFahrzeugBJ.Items.Add(reader[“Baujahr”].ToString()); Here the reader: OleDbDataReader …
Tag: database
How to simplify nested select in where clause?
I have 4 tables EMPLOYEE, COMPANY, WORKS and MANAGES. The tables are defined as follows- I need to find all the employees who live in the same city as the company for which they work. So far I have done this. It’s working fine. But I want to know is there any simpler way to do this query? Answer You
SQL Query Where Date = Today Minus 7 Days
I have a SQL table of hits to my website called ExternalHits. I track the URL as URLx and the date the page was accessed as Datex. I run this query every week to get the count of total hits from the week before, and every week I have to manually change the “between” dates. Is there some way I
SQL – listing members on enrolled classes
I am trying to figure out why this isn’t working. I am trying to select each member’s names and the classes that each member is enrolled on together with the class trainers name. This is what I have at the minute: Any help or tips would be appreciated as I am still learning SQL. Extra info: enrolment table has columns
Is there a way to execute an SQL merge atomically?
I am looking for a way to connect a tuple of values with a random UUID in a non-locking manner and without the potential to fail a transaction due to concurrency constraints. The table I need to …
MySQL Error: : ‘Access denied for user ‘root’@’localhost’
$ ./mysqladmin -u root -p ‘redacted’ Enter password: mysqladmin: connect to server at ‘localhost’ failed error: ‘Access denied for user ‘root’@’localhost’ (using password: YES)’ How can I fix …
Limit SQL Primary Key to certain ranges
I want to make the autoincrementing Primary Key of my table to only be in the ranges 1-12, 101-112, 201-212, etc. This is because I have a series of repeating items that are 12 in a set and then you get another set, having them indexed in this way by the Primary Kay would be most easy, I think. Is
I keep getting 1064 error in phpmyadmin
I am trying to create a table in phpmyadmin with the following SQL : CREATE TABLE `umOrder`.`Bill` ( `Id` INT(5) NOT NULL AUTO_INCREMENT , `userID` VARCHAR(255) NOT NULL , `product` …
Postgres Function to insert multiple records in two tables
create table public.orders ( orderID serial PRIMARY KEY, orderdate timestamp NOT NULL ); create table public.orderdetails ( orderdetailID serial PRIMARY KEY, orderID integer …
Housing Society management system database structure
I am designing billing structure for housing society yesterday I googled and gone through banking billing structure and designed my database structure but I am not sure whether this would be correct. So I am putting my billing database structure. Please tell me if I am wrong any where or any changes has to be done in my database structure.