Re: [Dhis2-devs] Sql view does not excute my SQL

2011-06-28 Thread jason.p.picker...@gmail.com
] Sql view does not excute my SQL To: Orvalho Augusto orvaq...@gmail.com Cc: Jason Pickering jason.p.picker...@gmail.com, DHIS 2 developers dhis2-devs@lists.launchpad.net Hello, In fact, SqlView just allow us to write a query where the SELECT keyword at the beginning as I presented in the previous

Re: [Dhis2-devs] Sql view does not excute my SQL

2011-06-28 Thread Orvalho Augusto
on postgres. Sent from my HTC - Reply message - From: Hieu Dang Duy hieu.hispviet...@gmail.com Date: Mon, Jun 27, 2011 23:02 Subject: [Dhis2-devs] Sql view does not excute my SQL To: Orvalho Augusto orvaq...@gmail.com Cc: Jason Pickering jason.p.picker...@gmail.com, DHIS 2

Re: [Dhis2-devs] Sql view does not excute my SQL

2011-06-27 Thread Orvalho Augusto
Thanks for the reply and I am so sorry to disturb you guys for my ignorance. The thing is when I go from your the option 2 I get this: enter a value between 1 and 255 characters long. That query has more than 255 characters. I did not explain clearly on first time. So I have no choice. And

Re: [Dhis2-devs] Sql view does not excute my SQL

2011-06-27 Thread Orvalho Augusto
I know now why the Querry does not show UP: I gave the name Missings_from_old_system under DHIS. And DHIS created the following view _view_Missingsfromoldsystem. So the _ is eaten! I reacreated with another name without _ and it is working. Caveman On 6/27/11, Orvalho Augusto

Re: [Dhis2-devs] Sql view does not excute my SQL

2011-06-27 Thread Hieu Dang Duy
Hello Orralho, On Mon, Jun 27, 2011 at 2:53 PM, Orvalho Augusto orvaq...@gmail.com wrote: Thanks for the reply and I am so sorry to disturb you guys for my ignorance. The thing is when I go from your the option 2 I get this: enter a value between 1 and 255 characters long. That query has

Re: [Dhis2-devs] Sql view does not excute my SQL

2011-06-27 Thread Hieu Dang Duy
Yes, actually, the system will take your view's name be a name of created one in your db. But there is a validation on checking the given name (from input). If there is any special symple/characters then they will be remove before view created. Sorry for this inconvenient. On Mon, Jun 27, 2011 at

Re: [Dhis2-devs] Sql view does not excute my SQL

2011-06-27 Thread Jason Pickering
It is important to keep in mind conceptually why this SQL view functionality is there. DHIS2 destroys certain tables during some processes, such as the resource table generation process. If you have any tables which the a particular view depends on, the database will prevent DHIS2 from dropping

Re: [Dhis2-devs] Sql view does not excute my SQL

2011-06-27 Thread Orvalho Augusto
Really thanks for this advice! Caveman On 6/27/11, Jason Pickering jason.p.picker...@gmail.com wrote: It is important to keep in mind conceptually why this SQL view functionality is there. DHIS2 destroys certain tables during some processes, such as the resource table generation process. If

Re: [Dhis2-devs] Sql view does not excute my SQL

2011-06-27 Thread Orvalho Augusto
Under MySQL there is one problem. In mysql we call a stored procedure like this: call storedprocedure(); And this SQLview just allow SELECT as the first word. Any ideias? Caveman On Mon, Jun 27, 2011 at 1:33 PM, Orvalho Augusto orvaq...@gmail.com wrote: Really thanks for this advice!

Re: [Dhis2-devs] Sql view does not excute my SQL

2011-06-27 Thread Hieu Dang Duy
Hello, In fact, SqlView just allow us to write a query where the SELECT keyword at the beginning as I presented in the previous mail and belongs to the resource tables (7 ones) to serve your purpose on querying data. If one of them deleted/regenerated then the view, which are linked to, would be

Re: [Dhis2-devs] Sql view does not excute my SQL

2011-06-26 Thread Hieu Dang Duy
Hello, Sql View is a functinality which allows the user (admin/mod) to create a view without interact inside DBMS directly. One more important point is that you cannot use any keyword such as SELECT INTO, UPDATE, DELETE, ALTER excepting SELECT in your query only. Btw, I would like to present to

[Dhis2-devs] Sql view does not excute my SQL

2011-06-25 Thread Orvalho Augusto
I have this simply query: -- select * from v_omissos -- The v_omissos is a view for: CREATE OR REPLACE VIEW v_omissos AS select '999' AS `OLDMISSCODE`, count(0) AS `contagem` from `datavalue` where (`datavalue`.`value` = '999') union all select '' AS `OLDMISSCODE`,count(0) AS `count(*)` from