[Solved] How to autofill a field with numerical values

Discuss the database features

[Solved] How to autofill a field with numerical values

Postby tivadarpreiss » Thu Mar 14, 2019 4:11 pm

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 8 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
tivadarpreiss
 
Posts: 2
Joined: Thu Mar 14, 2019 4:05 pm

Re: How to autofill a field with numerical values

Postby F3K Total » Thu Mar 14, 2019 7:21 pm

If i got you right,
execute ONCE via Tools/SQL... the following command:
Code: Select all   Expand viewCollapse view
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 7 OOo, AOO, LOLinux Mint OOo, AOO, LO
F3K Total
Volunteer
 
Posts: 903
Joined: Fri Dec 16, 2011 8:20 pm

Re: How to autofill a field with numerical values

Postby tivadarpreiss » Thu Mar 14, 2019 10:32 pm

Thanks. You are an Ace!!!
OOO4.1 Win7
tivadarpreiss
 
Posts: 2
Joined: Thu Mar 14, 2019 4:05 pm


Return to Base

Who is online

Users browsing this forum: No registered users and 3 guests