我有一个带有"订阅"的表,当我按顺序对记录进行排序时,我得到了错误的结果.我的结果不按MyColumn排序
我的查询是:
Select Subscriptioncode from Subscription order by Subscriptioncode desc
Run Code Online (Sandbox Code Playgroud)
我的结果如下:
90
80
8
700
73
634
100
Run Code Online (Sandbox Code Playgroud)
为何获得此结果?
在SubscriptionCode中,某些行是空的.
100
我有一堂这样的课:
public class menu{
public string Permission{get;set;}
}
Run Code Online (Sandbox Code Playgroud)
的值Permission是 Encripted 的。我想要所有记录在Permission哪里True。为此,我使用以下查询:
return
_menuSettings.Where(row => Convert.ToBoolean(Utilities.Encryption.Decrypt(row.Permission,"key"))==true).ToList();
Run Code Online (Sandbox Code Playgroud)
但我收到此错误:
LINQ to Entities 无法识别“Boolean ToBoolean(System.String)”方法,并且此方法无法转换为存储表达式。
我在google上搜索过,但无法解决。
谢谢
我有两张桌子:
ArticleSubscription在Article表中,我有两列构成主键:id, sl。在Subscription表中我有一个外键“idsl”。
我使用这个约束:
constraint FK_idsl
foreign key (idsl) references CSS_SubscriptionGroup(id, sl)
Run Code Online (Sandbox Code Playgroud)
但是当我运行查询时,我收到此错误:
外键中引用列的数量与表 X 中引用列的数量不同
要做到这一点,我使用下面的代码:
html,body{
height:100% !important
;padding:0 !important;margin:0 !important}
body{
overflow-y:hidden;
overflow-x:hidden;
}
#main{
width:100%;
float:right;
text-align:right;
height:100%;
}
#main>div
{
display:inline-block;
margin-bottom:-0px;
float:right;
}
#triangleWrapper {
width: 18%;
height:100%;
}
.segmentTriangle {
width: 100%;
height: 100%;
left: 0px;
top: 0px;
background: transparent linear-gradient(to left top, #e94d4d 50%, transparent 50%) repeat scroll 0% 0%;
}
.segmentTriangleleft
{
width: 100%;
height: 100%;
left: 0px;
top: 0px;
background: transparent linear-gradient(to right bottom, #f65c5b 50%, transparent 50%) repeat scroll 0% 0%;
}
.col-zozan
{ …Run Code Online (Sandbox Code Playgroud)我在SQL Server中有这个表:
Cell1 Cell2 Cell3 Cell4 Cell5 Cell6 vbzero
3 65 **12** 0 0 0
12 4 5 1 6 8
10 0 0 0 0 0
1 90 0 0 0 0
Run Code Online (Sandbox Code Playgroud)
我希望在零之前得到最后的价值.例如,在第一行中获得12,在第二行中获得8,因为行拖曳不包含零,而第三行获得10,...
如何在SQL Server中执行此操作.