易截截图软件、单文件、免安装、纯绿色、仅160KB

SQLITE 下面的语句该怎么写

在 SQL SERVER 中的语句 是:
  SELECT
    (ROW_NUMBER() OVER (ORDER BY Name) - 1) / 4 + 1 AS TitleRow,
    (ROW_NUMBER() OVER (ORDER BY Name) - 1) % 4 + 1 AS TitleColumn,
    Name,
    Color,
    ThumbNailPhoto
from Production.MailLabel

在SQLITE 中该怎么写 ? 谢谢大侠

SQL code:
select
((select count(*) from MailLabel where Name<=a.Name)-1)/4+1 as TitleRow,
((select count(*) from MailLabel where Name<=a.Name)-1)%4+1 as TitleColumn,
Name,
Color,
ThumbNailPhoto
from MailLabel a



SQL code:
sqlite> select * from MailLabel;
name|color|ThumbNailPhoto
1|1|1
2|2|2
3|3|3
4|4|4
5|5|5
6|6|6
7|7|7
sqlite> select
...> ((select count(*) from MailLabel where Name<=a.Name)-1)/4+1 as TitleRow,
...> ((select count(*) from MailLabel where Name<=a.Name)-1)%4+1 as TitleColumn,
...> Name,
...> Color,
...> ThumbNailPhoto
...> from MailLabel a;
TitleRow|TitleColumn|name|color|ThumbNailPhoto
1 | 1 | 1 | 1 | 1
1 | 2 | 2 | 2 | 2


相关问答:

sqlite的sql语句问题

sqlite不会不支持and 吧?
select * from table where rootid=2 and uid=0 order by orderid asc,id asc
使用上面的语句查询不到数据,可是符合的条件是存在的.我取掉and,就有记录,不知道怎么回事
select * f ......

sqlite老是报错no such column

SELECT qsmallClass.Sname, qproducts.pmodel, qproducts.punit, qmaintain.mcount from qsmallClass INNER JOIN (qproducts INNER JOIN qmaintain ON qproducts.pid = qmaintain.pid) ON qsmallClass.Sid = qproduc ......

SQLITE存图片

大家好,请问各位大虾,谁有SQLITE存图片路径的代码或例子啊,请帮忙给小弟发一个,tiandaliubin@163.com 真的很急啊。先谢谢了。
http://www.sqlite.org/cvstrac/wiki?p=SqliteWrappers

引用
http://www.sql ......

SQLite返回的中文记录是乱码

WTL框架使用Unicode字符集
用下面函数插入记录
void CMainFrame::Insert()
{
TCHAR query[MAX_PATH] = {0};
_stprintf(query, _T("insert into correct_word values (\'發\',\& ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号