> On Mon, Jan 2, 2017 at 4:03 PM, Frank Millman <frank@chagford.com> wrote:
>
> Hi all
>
>
>
> It is a bit ugly, because I have to use the ‘NVARCHAR code’ column from
>
> tax_codes, not the primary key, but I think it would work.
>
>
>
NVARCHAR ? Are you using PostgreSQL as database server?
>
Oops, sorry.
I am testing with PostgreSQL and with SQL Server, so I was in the wrong mindset when I posted.
I should have said VARCHAR.
Frank
First, there is no need to make row_id's when you already have a valid primary key. Next, DO NOT begin object names with underscores. So try this model instead:
CREATE TABLE tax_categories ( tax_category VARCHAR() NOT NULL, description VARCHAR() NOT NULL, CONSTRAINT tax_cats_pk PRIMARY KEY (tax_category) );