sql problem...
Hej Eksperten folks!Jeg har et lille create table problemos...
CREATE TABLE tblLines(
invoiceId INTEGER not null,
unitId INTEGER not null,
unitAmount NUMERIC(10,2) ,
unit VARCHAR(5) ,
unitDescription VARCHAR(50) ,
pricePrUnit NUMERIC(10,2)
DEFAULT 0
CHECK (pricePrUnit >= 0),
amount COMPUTED BY
(unitAmount * pricePrUnit),
PRIMARY KEY (unitId, invoiceId));
Hvordan får jeg ovenstående "amount" til at acceptere at hvis der står 0 i unitAmount, skal den sætte 1 i beregningen som default??
Kan det overhovedet lades sig gøre??
Jeg håber på nogle hurtige svar da det helst skal bruges i dag!
På forhånd Tak.
/Haunted.