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 2005 Forums
 Transact-SQL (2005)
 - sign

Author  Topic 

rjhe22
Constraint Violating Yak Guru

283 Posts

Posted - 2009-11-10 : 08:38:44
have this sql

INSERT INTO dbo.Sale_Details

OrderID ,
Administrator_ID ,
StockBroker_ID ,
Date_Sold ,
Units_Sold ,
Currency ,
Sale_Value_Euro ,
Screen_Last_Updated ,
UpdatedBy ,
UserName

SELECT
Order_ID ,
Administrator_ID ,
StockBroker_ID ,
Deal_Date ,
No_of_Units ,
curr_ID ,
Total_Cost_Euro ,
Screen_Last_Updated ,
UpdatedBy ,
Username
FROM dbo.Purchase_info
where Order_ID =155346


for the total_cost_euro in the selct part the number is a minus number. when im instering it into my other table it can be how do i sort that out

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-11-10 : 08:44:47
Your question is not very clear. Did you get any error?

Madhivanan

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

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-11-10 : 13:06:31
do you mean you want to ignore - sign ? if yes use ABS(Total_Cost_Euro) instead
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-11-10 : 13:57:09
where Order_ID =155346
and Total_Cost_Euro >= 0


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page
   

- Advertisement -