AW: esql nested queries
Hello Leo, it is not working either. But I think I know why that happends: in my source code there is the following: client ap_id=#10;645#10; if I us a attribute. I think because of #10; I get no match for the second query! Can that be? -Ursprüngliche Nachricht- Von: leo leonid [mailto:[EMAIL PROTECTED] Gesendet: Montag, 10. März 2003 17:54 An: [EMAIL PROTECTED] Betreff: Re: esql nested queries try this: esql:get-int column=ap_id ancestor=1/ --- /Leo On Montag, März 10, 2003, at 05:36 Uhr, Scherler, Thorsten wrote: Hello group, I am using cocoon 2.0.4. I tried the following the nested esql (not working): esql:connection esql:poolINSTA/esql:pool esql:execute-query esql:query select * from xml_verkauf /esql:query esql:results esql:row-results data client ep1 esql:get-int column=ap_id/ /ep1 /client aps esql:execute-query esql:query select * from ap_tab where ap_id =esql:get-int column=ap_id/ /esql:query esql:results esql:row-results ap esql:get-columns/ /ap /esql:row-results /esql:results esql:no-resultsno-results//esql:no-results esql:error-results/ /esql:execute-query /aps /data /esql:row-results /esql:results esql:no-results/ esql:error-results/ /esql:execute-query /esql:connection As soon as I change ... select * from ap_tab where ap_id =1 I can nest the query! Why can I not use esql:get-int column=ap_id/ ? King regards Mit freundlichem Gruss, Thorsten Scherler Marketing / Telefonmarketing Weidmüller GmbH Co. P.O. Box 2807 33058 Paderborn Tel.:+ 49 - 5252-960-350 Fax:+ 49 - 5252-960-116 eMail: [EMAIL PROTECTED] http://www.weidmueller.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: esql nested queries
Anyway, how many ways for sql are there? I found 3 different, what's the point in that? I am confused (again!) King regards -Ursprüngliche Nachricht- Von: Scherler, Thorsten Gesendet: Montag, 10. März 2003 18:12 An: Cocoon-Users (E-Mail) Betreff: AW: esql nested queries Hello Leo, it is not working either. But I think I know why that happends: in my source code there is the following: client ap_id=#10;645#10; if I us a attribute. I think because of #10; I get no match for the second query! Can that be? -Ursprüngliche Nachricht- Von: leo leonid [mailto:[EMAIL PROTECTED] Gesendet: Montag, 10. März 2003 17:54 An: [EMAIL PROTECTED] Betreff: Re: esql nested queries try this: esql:get-int column=ap_id ancestor=1/ --- /Leo On Montag, März 10, 2003, at 05:36 Uhr, Scherler, Thorsten wrote: Hello group, I am using cocoon 2.0.4. I tried the following the nested esql (not working): esql:connection esql:poolINSTA/esql:pool esql:execute-query esql:query select * from xml_verkauf /esql:query esql:results esql:row-results data client ep1 esql:get-int column=ap_id/ /ep1 /client aps esql:execute-query esql:query select * from ap_tab where ap_id =esql:get-int column=ap_id/ /esql:query esql:results esql:row-results ap esql:get-columns/ /ap /esql:row-results /esql:results esql:no-resultsno-results//esql:no-results esql:error-results/ /esql:execute-query /aps /data /esql:row-results /esql:results esql:no-results/ esql:error-results/ /esql:execute-query /esql:connection As soon as I change ... select * from ap_tab where ap_id =1 I can nest the query! Why can I not use esql:get-int column=ap_id/ ? King regards Mit freundlichem Gruss, Thorsten Scherler Marketing / Telefonmarketing Weidmüller GmbH Co. P.O. Box 2807 33058 Paderborn Tel.:+ 49 - 5252-960-350 Fax:+ 49 - 5252-960-116 eMail: [EMAIL PROTECTED] http://www.weidmueller.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: esql nested queries
It looks like you stored your 'ap_id's enclosed within two carriage returns. (#10; or #xA; are encoded CRs, AFAIK). So I'd recommend you strip you DB column from these CRs and change the data type for this column to INT) /Leo On Montag, März 10, 2003, at 06:12 Uhr, Scherler, Thorsten wrote: Hello Leo, it is not working either. But I think I know why that happends: in my source code there is the following: client ap_id=#10;645#10; if I us a attribute. I think because of #10; I get no match for the second query! Can that be? -Ursprüngliche Nachricht- Von: leo leonid [mailto:[EMAIL PROTECTED] Gesendet: Montag, 10. März 2003 17:54 An: [EMAIL PROTECTED] Betreff: Re: esql nested queries try this: esql:get-int column=ap_id ancestor=1/ --- /Leo On Montag, März 10, 2003, at 05:36 Uhr, Scherler, Thorsten wrote: Hello group, I am using cocoon 2.0.4. I tried the following the nested esql (not working): esql:connection esql:poolINSTA/esql:pool esql:execute-query esql:query select * from xml_verkauf /esql:query esql:results esql:row-results data client ep1 esql:get-int column=ap_id/ /ep1 /client aps esql:execute-query esql:query select * from ap_tab where ap_id =esql:get-int column=ap_id/ /esql:query esql:results esql:row-results ap esql:get-columns/ /ap /esql:row-results /esql:results esql:no-resultsno-results//esql:no-results esql:error-results/ /esql:execute-query /aps /data /esql:row-results /esql:results esql:no-results/ esql:error-results/ /esql:execute-query /esql:connection As soon as I change ... select * from ap_tab where ap_id =1 I can nest the query! Why can I not use esql:get-int column=ap_id/ ? King regards Mit freundlichem Gruss, Thorsten Scherler Marketing / Telefonmarketing Weidmüller GmbH Co. P.O. Box 2807 33058 Paderborn Tel.:+ 49 - 5252-960-350 Fax:+ 49 - 5252-960-116 eMail: [EMAIL PROTECTED] http://www.weidmueller.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: esql nested queries
leo leonid wrote: It looks like you stored your 'ap_id's enclosed within two carriage returns. (#10; or #xA; are encoded CRs, AFAIK). So I'd recommend you strip you DB column from these CRs and change the data type for this column to INT) Can you do that with normalize-space()? esql:get-int column=normalize-space(ap_id)/ /Leo On Montag, März 10, 2003, at 06:12 Uhr, Scherler, Thorsten wrote: Hello Leo, it is not working either. But I think I know why that happends: in my source code there is the following: client ap_id=#10;645#10; if I us a attribute. I think because of #10; I get no match for the second query! Can that be? -Ursprüngliche Nachricht- Von: leo leonid [mailto:[EMAIL PROTECTED] Gesendet: Montag, 10. März 2003 17:54 An: [EMAIL PROTECTED] Betreff: Re: esql nested queries try this: esql:get-int column=ap_id ancestor=1/ --- /Leo On Montag, März 10, 2003, at 05:36 Uhr, Scherler, Thorsten wrote: Hello group, I am using cocoon 2.0.4. I tried the following the nested esql (not working): esql:connection esql:poolINSTA/esql:pool esql:execute-query esql:query select * from xml_verkauf /esql:query esql:results esql:row-results data client ep1 esql:get-int column=ap_id/ /ep1 /client aps esql:execute-query esql:query select * from ap_tab where ap_id =esql:get-int column=ap_id/ /esql:query esql:results esql:row-results ap esql:get-columns/ /ap /esql:row-results /esql:results esql:no-resultsno-results//esql:no-results esql:error-results/ /esql:execute-query /aps /data /esql:row-results /esql:results esql:no-results/ esql:error-results/ /esql:execute-query /esql:connection As soon as I change ... select * from ap_tab where ap_id =1 I can nest the query! Why can I not use esql:get-int column=ap_id/ ? King regards Mit freundlichem Gruss, Thorsten Scherler Marketing / Telefonmarketing Weidmüller GmbH Co. P.O. Box 2807 33058 Paderborn Tel.:+ 49 - 5252-960-350 Fax:+ 49 - 5252-960-116 eMail: [EMAIL PROTECTED] http://www.weidmueller.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: esql nested queries
Scherler wrote: leo leonid wrote: (#10; or #xA; are encoded CRs, AFAIK). So I'd recommend you strip you DB column from these CRs and change the data type for this column to INT) Can you do that with normalize-space()? esql:get-int column=normalize-space(ap_id)/ On Montag, März 10, 2003, at 05:36 Uhr, Scherler, Thorsten wrote: Hello group, I am using cocoon 2.0.4. I tried the following the nested esql (not working): esql:execute-query esql:query select * from ap_tab where ap_id =esql:get-int column=ap_id/ /esql:query As soon as I change ... select * from ap_tab where ap_id =1 I can nest the query! Why can I not use esql:get-int column=ap_id/ ? You cannot apply an arbitrary function to logicsheet attributes. You should try to distinguish the different phases and tools that are orchestrated to accomplish serving an XSP. You might want to look up the functions your DBMS provides for comparing strings. You cannot use esql:get/ inside an esql:query/ UNLESS it is surrounded by an esql:parameter/ OR the query is an xsp:expr/ and composed of java strings. You need to use the ancestor attribute to refer to a result from outside this esql:execute-query/ You need to search the list and docs for examples. This has been up before, actually, only a couple of hours ago. You should add to wiki.cocoondev.org to share your new knowledge. HTH Chris. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]