[Solved] How to autofill a field with numerical values

Discuss the database features
Post Reply
tivadarpreiss
Posts: 2
Joined: Thu Mar 14, 2019 4:05 pm

[Solved] How to autofill a field with numerical values

Post by tivadarpreiss »

Hi
I want to make a DB with house number( basically numbers, but should allow to enter letters too, for ie. 3 and 3/F or 3F), a checkbox, and a text field.

Is it possible to enter house number from 1 to 2000 with autofill/autocomplete/etc option? HOw

Thx
Attachments
FENCE.odb
(11.16 KiB) Downloaded 223 times
Last edited by Hagar Delest on Fri Mar 15, 2019 10:28 pm, edited 1 time in total.
Reason: tagged solved
OOO4.1 Win7
F3K Total
Volunteer
Posts: 1038
Joined: Fri Dec 16, 2011 8:20 pm

Re: How to autofill a field with numerical values

Post by F3K Total »

If i got you right,
execute ONCE via Tools/SQL... the following command:

Code: Select all

DELETE FROM "Table1";
INSERT INTO "Table1" ("HOUSE NUMBER",CHECKBOX) (SELECT N1||N2||N3||N4 AS I, false FROM
(SELECT ORDINAL_POSITION - 1 N1 From INFORMATION_SCHEMA.SYSTEM_COLUMNS WHERE TABLE_NAME = 'SYSTEM_TABLES' AND ORDINAL_POSITION<= 10),
(SELECT ORDINAL_POSITION - 1 N2 From INFORMATION_SCHEMA.SYSTEM_COLUMNS WHERE TABLE_NAME = 'SYSTEM_TABLES' AND ORDINAL_POSITION<= 10),
(SELECT ORDINAL_POSITION - 1 N3 From INFORMATION_SCHEMA.SYSTEM_COLUMNS WHERE TABLE_NAME = 'SYSTEM_TABLES' AND ORDINAL_POSITION<= 10),
(SELECT ORDINAL_POSITION - 1 N4 From INFORMATION_SCHEMA.SYSTEM_COLUMNS WHERE TABLE_NAME = 'SYSTEM_TABLES' AND ORDINAL_POSITION<= 10) WHERE I between '0001' and '2000');
CHECKPOINT DEFRAG
Then ONCE Menue View/Refresh Tables and see afterwards, what you find in the table ...
  • MMove 1.0.6
  • Extension for easy, exact positioning of shapes, pictures, controls, frames ...
  • my current system
  • Windows 10 AOO, LOLinux Mint AOO, LO
tivadarpreiss
Posts: 2
Joined: Thu Mar 14, 2019 4:05 pm

Re: How to autofill a field with numerical values

Post by tivadarpreiss »

Thanks. You are an Ace!!!
OOO4.1 Win7
D Soyars
Posts: 6
Joined: Wed May 29, 2019 5:40 pm

Re: [Solved] How to autofill a field with numerical values

Post by D Soyars »

Similar but not the same.
I am trying to connect date and address numbers to create a ID# say opened new file january 15th 2020 and the address is 1234 main im looking for an ID # of 2001151234. Soo... YYMMDDAAAA please help iv been working on this database for far too long
OpenOffice 4.1.5 on Windows 10
Post Reply