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 |
|
aoriju
Posting Yak Master
156 Posts |
Posted - 2009-01-06 : 06:27:33
|
| I am a new user in linq.Can u please tell me how to cast the iqueryable(decimal?) into decimalThanks |
|
|
raky
Aged Yak Warrior
767 Posts |
Posted - 2009-01-06 : 06:29:44
|
| why you want to change a decimal datatype column into again decimal.Iam giving basic syntax to convert a column of someotherdatatype into decimal..Note we can't convert columns of all datatypes( Only with some are possible) to decimal datatype Select cast( columnname as decimal(18,2)) from yourtable |
 |
|
|
aoriju
Posting Yak Master
156 Posts |
Posted - 2009-01-06 : 06:36:32
|
| Thanks for the replythe casting you send is of sql queryits not the exact i want.My Linq query is written belowvar value= from tbl in contract.EVS_SRV_Contract_Details where tbl.Contract_Id == contractId && tbl.Service_Id == serviceId select tbl.Transaction_Rate;the type of value is iqueryable(decimal?)but i want as decimal.Thanks |
 |
|
|
elancaster
A very urgent SQL Yakette
1208 Posts |
Posted - 2009-01-06 : 06:46:18
|
| is there not perhaps a linq forum you could post your question in rather than a sql server one?Em |
 |
|
|
aoriju
Posting Yak Master
156 Posts |
Posted - 2009-01-06 : 07:03:54
|
| Sorry Boss.If anyBody knows the answer then tel me. |
 |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2009-01-06 : 10:32:51
|
| Microsoft forum is good for LINQ:http://forums.microsoft.com/MSDN/ShowForum.aspx?siteid=1&ForumID=123 |
 |
|
|
aoriju
Posting Yak Master
156 Posts |
Posted - 2009-01-07 : 05:20:22
|
| Thanks.Its very useful |
 |
|
|
|
|
|