Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
constraint
- Page 1
Constraint Help Please
Programming
Databases
16 Years Ago
by Trogan
…, 5 credit_limit number(6,2), 6
constraint
customer_customer_no_pk primary key (customer_no)); Table created.…not null, 5 emaill_address varchar2(30), 6
constraint
salesman_salesman_id_pk primary key (salesman_id)); Table created.…following error... [QUOTE]ORA-00001: unique
constraint
(SYSTEM.INVOICE_INVOICE_NO_PK) violated[/QUOTE] I …
constraint
Programming
Databases
13 Years Ago
by deolalkar_pooja
…), city varchar(20)) --------------------------------- I want to put following
constraint
, 'name is having unique with city taken only from … unique constraints with name. I searched many about
constraint
with city, but i don't get it … now. Will you please help me about
constraint
. I used 'BETWEEN'
constraint
, but it failed. What should I do…
Constraint
Programming
Databases
13 Years Ago
by deolalkar_pooja
…), city varchar(20)) --------------------------------- I want to put following
constraint
, 'name is having unique with city taken only from … unique constraints with name. I searched many about
constraint
with city, but i don't get it … now. Will you please help me about
constraint
. I used 'BETWEEN'
constraint
, but it failed. What should I do…
Re: Constraint
Programming
Databases
10 Years Ago
by M.Waqas Aslam
… here is the code for others. ALTER TABLE member_email ADD
CONSTRAINT
chk_Email_Cell CHECK( (cellNbr is not null and email is null… null and email is not null) ) ALTER TABLE member_email ADD
CONSTRAINT
chk_Cell_Carrier CHECK( (cellNbr is not null and Carrier is not…
Constraint Help
Programming
Databases
14 Years Ago
by wafergozo
How can I do a
constraint
/trigger to check a value from another table for example CHECK tblAcademic.role = 1 and [currentable].post = 1 Please help
Constraint
Programming
Databases
10 Years Ago
by M.Waqas Aslam
… in it. Id Email CellNumber Carrier I want to create
constraint
who check following conditions, 1-Email can be null if…
Re: Constraint where both columns cannot be null, but one can
Programming
Databases
13 Years Ago
by buddylee17
Not sure about the unique part, as a unique
constraint
will only support one null value in the column. It sounds like you potentially could have many. Use a check
constraint
to verify both aren't null: [code] ALTER TABLE TableA ADD
CONSTRAINT
CK_BothDepartsNotNull CHECK (departA IS NOT NULL OR departB IS NOT NULL) [/code]
Constraint Satisfaction Programming
Programming
Computer Science
14 Years Ago
by csinquirer
Please suggest good resources in print and online regarding
constraint
satisfaction programming. Thanks.
Re: Constraint Satisfaction Programming
Programming
Computer Science
14 Years Ago
by MosaicFuneral
Sounds a lot like a new fetish. [URL="http://lmgtfy.com/?q=
constraint
+satisfaction+programming"]Google[/URL]
Constraint where both columns cannot be null, but one can
Programming
Databases
13 Years Ago
by agr8lemon
… columns: ID(PK), location, departA, departB. I would like a
constraint
across departA and departB so that both of them can…
Constraint inquiry
Programming
Databases
7 Years Ago
by lps
…-03-01 2019-03-01 I wish to add a
constraint
to block if same user add in a setting with…
Re: Constraint
Programming
Databases
12 Years Ago
by BitBlt
There are several different "flavors" of
constraint
. Some of them have to do with referential … Note that I am talking here about defining a
constraint
as a LOGICAL database design activity, not as a…are many reasons for implementing or not implementing any particular
constraint
. Some examples of this are performance impact, replication,…
Re: Constraint Help Please
Programming
Databases
16 Years Ago
by Sulley's Boo
<_< Remove the PK (invoice_no, ISBN) from the Delivery table so that you can repeat the invoice_no as much as you want. Think of a new PK for the detail (delivery) table. How about Serial no?
Re: Constraint Help Please
Programming
Databases
16 Years Ago
by Trogan
Hi Sulley, thank you for the reply. I will remove the PK (invoice_no, ISBN) from the Delivery table and put something in it's place and see how it goes. Thanks again! :)
Re: Constraint Help Please
Programming
Databases
16 Years Ago
by Trogan
It didn't work. I should have mentioned, I need to enter multiple data into the [B]invoice[/B] table using the same [B]invoice_no[/B]. Any other suggestions please?
Re: Constraint Help Please
Programming
Databases
16 Years Ago
by jwenting
So you've made a serious error in your datamodel. Apparently a record in the invoice table does not represent an invoice but a line item. Redesign your database to match that, with a new invoice table containing only items that are not repeated (like the invoice number), and a lineitem table containing a foreign key into to the invoice table to …
Re: Constraint Help Please
Programming
Databases
16 Years Ago
by Sulley's Boo
You can overcome that problem by having a composite key (2 PKs) for the invoice table .. where you'll be able to repeat the invoice number BUT not the other Primary key .. :?: Can you show us your ERD?
Re: Constraint Help Please
Programming
Databases
16 Years Ago
by jwenting
yes, but that would leave you with a substandard database model. You'd have to duplicate data in each record, a bad idea.
Re: Constraint Help Please
Programming
Databases
16 Years Ago
by Sulley's Boo
<_< do what jwenting said .. 1 master table (invoice) and a transaction table linked to it (one to many relationship) ..
Re: Constraint Help Please
Programming
Databases
16 Years Ago
by Trogan
Forgot to reply, but I managed to get things working by making some minor changes to the tables.
Re: Constraint Help Please
Programming
Databases
16 Years Ago
by jinternalframe
Hey good that you made your stuff work. But keep in mind this thing - The databases are only the repositoires of data. It is you who will have to decide what data goes in where and make sure that you use the capabilities of the database to reflect the exact needs of your data model (your data). Making ad-hoc changes might work bu they may not be …
Re: constraint
Programming
Databases
13 Years Ago
by smantscheff
If the field may only have four values, use an enum type. [CODE]create table publisher(name varchar(20), city enum('mumbai','pune','nasik','panji'))[/CODE]
Re: constraint
Programming
Databases
13 Years Ago
by deolalkar_pooja
hi......smantscheff. i tried on ur solution, but it doesn't work. Plz, help me in different way.
Re: constraint
Programming
Databases
13 Years Ago
by smantscheff
What the hell do you mean with "doesn't work" ?
Re: constraint
Programming
Databases
13 Years Ago
by deolalkar_pooja
i means, sql server doent't support 'enum' type.
Re: constraint
Programming
Databases
13 Years Ago
by smantscheff
This here is a MySQL forum.
Re: constraint
Programming
Databases
13 Years Ago
by deolalkar_pooja
I know, this is mysql forum. I wrongly put this question in this forum. but i want the output in 'MS SQL Server'. Thanks & regerds, Pooja.
Re: constraint
Programming
Databases
13 Years Ago
by smantscheff
Create a lookup table for cities and link your publisher table to it.
Re: Constraint
Programming
Databases
13 Years Ago
by deolalkar_pooja
create table publisher(name varchar(20), city varchar(20) check(city in('mumbai', 'pune', 'nasik', 'panji')))
Re: Constraint
Programming
Databases
13 Years Ago
by debasisdas
Between is used on number or date data types not on string. ex 1. number between 1 to 10 2. date between 1-jan and 31-jan etc...
1
2
3
17
Next
Last
Search
Search
Forum Categories
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Forums
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2024 DaniWeb® LLC