Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/34.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
postgres中的sql_Sql_Asp.net_Postgresql - Fatal编程技术网

postgres中的sql

postgres中的sql,sql,asp.net,postgresql,Sql,Asp.net,Postgresql,我在postgres中编写了这个查询,它可以工作,但当我在程序asp c中使用它时,它不会返回任何内容,就像他没有任何数据一样 对我的英语有什么帮助吗 select * from (select child as enfant,title as libelle, COALESCE(parent ,child) as Parent from tree2) as tree2 order by COALESCE(parent , 1),parent,enfant 和…一样 select *

我在postgres中编写了这个查询,它可以工作,但当我在程序asp c中使用它时,它不会返回任何内容,就像他没有任何数据一样 对我的英语有什么帮助吗

select * from
(select child as enfant,title as libelle, COALESCE(parent ,child) as Parent  
from tree2) as tree2  
order by COALESCE(parent , 1),parent,enfant
和…一样

select * from
(select child as enfant,title as libelle, COALESCE(parent ,child) as Parent  
from tree2) as tree2  
order by COALESCE(parent , 1),parent,enfant
但是不知道C,这是另一个问题,我们不能在没有任何信息的情况下解决这个问题。

salam 这很奇怪,但我解决了,这是我的c代码中的一个问题 无论如何

用于查询 选择儿童作为儿童,标题作为诽谤,合并父母,儿童作为父母 从树2 父母的顺序最后为空,孩子的顺序最后为空
是的,是一样的,我试过了,很清楚urs thnks

听起来C代码是个问题。从C运行查询时会发生什么情况?请同时包含您的C代码,以便我们查看是否有错误。
select child as enfant, title as libelle, COALESCE(parent ,child) as Parent  
from tree2
order by parent NULLS LAST, enfant NULLS LAST