|
View previous topic :: View next topic
|
| Author |
Message |
Huzefa
New User

Joined: 05 Dec 2006 Posts: 83 Location: Bangalore
|
|
|
|
I have a column which is not a primary key.
I try to insert a duplicate value in it, but I am not able to insert and neither do I get any errors.
Say there are 100 with 95 records having common values.
Only 6 records are inserted and others are not not inserted and neither do they give error. |
|
| Back to top |
|
 |
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
What does your insert look like?
What does the table look like? |
|
| Back to top |
|
 |
Huzefa
New User

Joined: 05 Dec 2006 Posts: 83 Location: Bangalore
|
|
|
|
Its like
Insert into table1 values
(:value1,:value2,NULL,:value4)
My table has four columns
value1 - already has duplicate values
value2 - date
value3 - no
value4 - amount
I try to insert:
12345,'2006-09-09',Null,'45.98'
12345,'2006-09-09',Null,'25.18'
12345,'2006-09-09',Null,'65.28'
66666,'2006-09-09',Null,'85.48'
12345,'2006-09-09',Null,'95.58'
77777,'2006-09-09',Null,'45.68'
it inserts value:
12345,'2006-09-09',Null,'45.98'
66666,'2006-09-09',Null,'85.48'
77777,'2006-09-09',Null,'45.68'
For others it does not show error |
|
| Back to top |
|
 |
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Are you inserting into a VIEW?
Could a stored procedure or user-defined function be in play?
Did you check the value of SQLERRD(3) in the SQLCA?
How are confirming that the other rows were not inserted, selecting from a VIEW? |
|
| Back to top |
|
 |
Huzefa
New User

Joined: 05 Dec 2006 Posts: 83 Location: Bangalore
|
|
|
|
I am not using a VIEW. Its a table...
I am not using stored procedures neither do I get any sql errors..
When I use spufi to check the table I donot find the rows inserted in it. |
|
| Back to top |
|
 |
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Aside from the fact that a VIEW looks like a table and acts like a table but may not select like a table, I don't know what to say....
BTW, how would you confirm that it is a table and not a view? |
|
| Back to top |
|
 |
Suryanarayana.tadala
New User

Joined: 03 Nov 2005 Posts: 43 Location: St.Louis
|
|
|
|
| Could you tell me if any indexes are built on this table or can u provide me the DDL of the table in case if possible |
|
| Back to top |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Try to insert a duplicate row in spufi and post the insert and the result here. |
|
| Back to top |
|
 |
|
|