Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
acko
Yak Posting Veteran
52 Posts |
Posted - 2003-08-28 : 10:24:05
|
| Hi I have the folowing stored proc.CREATE PROC NewDoc @Vrsta nvarchar(3), @Sifra int OUTPUTASINSERT Doc(Vrsta)VALUES ( @Vrsta)SELECT @Sifra = @@IDENTITYdeclare @sifra intexec novidokument '06', @sifra outputprint @sifraThe field Vrsta in table Doc is varchar(3), but after insert into the table the value in the table is not 06 then 6. The same thing is with everty string containing zero on the begining.How can i resolve this problem?Thanks Alex |
|
|
mr_mist
Grunnio
1870 Posts |
Posted - 2003-08-28 : 11:06:59
|
| Are you sure the column isn't an int?select convert(nvarchar(3),'06')-- 06select convert(int,convert(nvarchar(3),'06'))-- 6-------Moo. :) |
 |
|
|
|
|
|