| Author |
Topic |
|
jogin malathi
Posting Yak Master
117 Posts |
Posted - 2007-06-06 : 07:54:52
|
| hi allin database i want to insert 01020304.....for f_area id datatype is inthow this is possibleThanks in advanceMalathi Rao |
|
|
pbguy
Constraint Violating Yak Guru
319 Posts |
Posted - 2007-06-06 : 08:01:57
|
| Make that column as identity, so you no need to insert it will automatically insertedf_area_id int identity(1,1)--------------------------------------------------S.Ahamed |
 |
|
|
jogin malathi
Posting Yak Master
117 Posts |
Posted - 2007-06-06 : 08:19:58
|
quote: Originally posted by pbguy Make that column as identity, so you no need to insert it will automatically insertedf_area_id int identity(1,1)--------------------------------------------------S.Ahamed
no its not workingthe same 1 is insertedi created table ascreate table temp1(id int ,f_f int identity(1,1))Malathi Rao |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-06-06 : 08:24:20
|
What is not working ? Any error message ?create table temp1(id int ,f_f int identity(1,1))insert into temp1 ( id ) values ( 20 )insert into temp1 ( id ) values ( 10 )select * from temp1id f_f ----------- ----------- 20 1 10 2 (2 row(s) affected) KH |
 |
|
|
jogin malathi
Posting Yak Master
117 Posts |
Posted - 2007-06-06 : 08:26:55
|
quote: Originally posted by khtan What is not working ? Any error message ?create table temp1(id int ,f_f int identity(1,1))insert into temp1 ( id ) values ( 20 )insert into temp1 ( id ) values ( 10 )select * from temp1id f_f ----------- ----------- 20 1 10 2 (2 row(s) affected) KH
ya no error buti requirement is 0102 and soo on shoul insert into f_f fieldnot 1,2,3......Malathi Rao |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-06-06 : 08:29:38
|
quote: for f_area iddatatype is int
You said it is integer ? KH |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
|
|
jogin malathi
Posting Yak Master
117 Posts |
Posted - 2007-06-06 : 08:31:34
|
quote: Originally posted by khtan
quote: for f_area iddatatype is int
You said it is integer ? KH
ya but is their any chanceMalathi Rao |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-06-06 : 08:34:43
|
do the formatting in your front end when you retrieve the data. KH |
 |
|
|
|