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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Quotes issue

Author  Topic 

abc123
Starting Member

47 Posts

Posted - 2008-04-28 : 10:28:20
Hi,

I have a proc which insert the rows into the table.
After executing the proc , I see double quotes in the output.
Any reason why I am getting following result

select * from Emp

EmpID EmpFirstName EmpLastName
1 ""ABC"" ""Sony""

same thing If i insert manulaly it works fine.

select * from Emp

EmpID EmpFirstName EmpLastName
1 "ABC" "Sony"

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-04-28 : 10:31:00
Can you post the procedure code?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-04-28 : 10:32:22
Are you using any kind of dynamic sql in your procedure? In any case, can you post the insert code used?
Go to Top of Page

abc123
Starting Member

47 Posts

Posted - 2008-04-28 : 10:49:28
INSERT INTO Emp(EmpID, EmpFirstName, EmpLastName)
VALUES(1, "ABC", "Sony")


INSERT INTO Emp(EmpID, EmpFirstName, EmpLastName)
VALUES(2 "Preeti" "Chawala")


print"Inserted %1! rows in Emp",@@rowcount
go
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-04-28 : 10:54:19
quote:
Originally posted by abc123

INSERT INTO Emp(EmpID, EmpFirstName, EmpLastName)
VALUES(1, 'ABC', 'Sony')


INSERT INTO Emp(EmpID, EmpFirstName, EmpLastName)
VALUES(2 ,'Preeti', 'Chawala')


print"Inserted %1! rows in Emp",@@rowcount
go



You dont need "" there use '' instead
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-04-28 : 11:04:22
Are you using Microsoft SQL Server?
The PRINT statement doesn't look right.



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

abc123
Starting Member

47 Posts

Posted - 2008-04-28 : 11:30:56
i am working on Sybase..
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-04-28 : 12:16:06
quote:
Originally posted by abc123

i am working on Sybase..



You've posted in wrong forum. This is MS SQL Server forum.
Go to Top of Page
   

- Advertisement -