Home » U++ Library support » U++ SQL » Fields of the same name in diff tables
Re: Fields of the same name in diff tables [message #21718 is a reply to message #21717] |
Mon, 01 June 2009 23:58 |
jeremy_c
Messages: 175 Registered: August 2007 Location: Ohio, USA
|
Experienced Member |
|
|
Ok, here is the full definition:
TABLE_(SUPPLIER)
INT_ (ID) PRIMARY_KEY AUTO_INCREMENT
STRING_ (NAME, 80) NOT_NULL UNIQUE
STRING_ (ADDRESS1, 128)
STRING_ (ADDRESS2, 128)
STRING_ (CITY, 128)
STRING_ (STATE, 80)
STRING_ (POSTAL_CODE, 24)
STRING_ (PRIMARY_PHONE, 35)
STRING_ (SECONDARY_PHONE, 35)
STRING_ (EMAIL, 128)
STRING_ (WEB_ADDRESS, 500)
BLOB_ (DESCRIPTION)
END_TABLE
Here is the resulting SQL:
-- From S_BeekPRO.sql
create table SUPPLIER (
ID integer primary key autoincrement,
NAME text not null,
ADDRESS1 text,
ADDRESS2 text,
CITY text,
STATE text,
POSTAL_CODE text,
PRIMARY_PHONE text,
SECONDARY_PHONE text,
EMAIL text,
WEB_ADDRESS text,
DESCRIPTION blob
);
-- From A_BeekPRO.sql
create unique index IDX_SUPPLIER$NAME on SUPPLIER(NAME);
Here is the output from sqlite3 session:
C:\Develop\Tools\upp\out\MSC9.Debug.Debug_full.Gui>sqlite3 BeekPRO.db3
SQLite version 3.6.7
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .schema SUPPLIER
CREATE TABLE SUPPLIER ( ID integer primary key autoincrement ,
ADDRESS1 text, ADDRESS2 text, CITY text, STATE text, POSTAL_CODE
text, PRIMARY_PHONE text, SECONDARY_PHONE text, EMAIL text,
WEB_ADDRESS text, DESCRIPTION blob);
Here is the output from the log:
* C:\develop\tools\upp\out\MSC9.Debug.Debug_full.Gui\BeekPRO.exe 01.06.2009 17:52:23, user: jeremy
ERROR Cannot add a NOT NULL column with default value NULL(0): Preparing: alter table SUPPLIER add NAME text not null
ERROR table SUPPLIER has no column named NAME(0): Preparing: create unique index IDX_SUPPLIER$NAME on SUPPLIER(NAME)
Jeremy
[Updated on: Tue, 02 June 2009 08:06] Report message to a moderator
|
|
|
|
|
Fields of the same name in diff tables
|
|
|
Re: Fields of the same name in diff tables
|
|
|
Re: Fields of the same name in diff tables
By: mirek on Mon, 01 June 2009 08:41
|
|
|
Re: Fields of the same name in diff tables
|
|
|
Re: Fields of the same name in diff tables
By: mirek on Mon, 01 June 2009 17:34
|
|
|
Re: Fields of the same name in diff tables
|
|
|
Re: Fields of the same name in diff tables
By: mirek on Mon, 01 June 2009 23:09
|
|
|
Re: Fields of the same name in diff tables
|
|
|
Re: Fields of the same name in diff tables
By: mirek on Mon, 01 June 2009 23:30
|
|
|
Re: Fields of the same name in diff tables
By: mirek on Mon, 01 June 2009 23:36
|
|
|
Re: Fields of the same name in diff tables
|
|
|
Re: Fields of the same name in diff tables
|
|
|
Re: Fields of the same name in diff tables
|
|
|
Re: Fields of the same name in diff tables
By: mirek on Tue, 02 June 2009 14:50
|
|
|
Re: Fields of the same name in diff tables
By: mirek on Tue, 02 June 2009 14:52
|
|
|
Re: Fields of the same name in diff tables
By: lectus on Thu, 20 December 2012 19:20
|
|
|
Re: Fields of the same name in diff tables
By: mirek on Sun, 23 December 2012 10:17
|
|
|
Re: Fields of the same name in diff tables
By: mirek on Tue, 02 June 2009 14:47
|
|
|
Re: Fields of the same name in diff tables
By: mr_ped on Tue, 02 June 2009 10:33
|
Goto Forum:
Current Time: Fri Apr 19 06:23:18 CEST 2024
Total time taken to generate the page: 0.05571 seconds
|