similar to: Can this 1337 PostgreSQL Subquery Union be done in AR?

Displaying 20 results from an estimated 6000 matches similar to: "Can this 1337 PostgreSQL Subquery Union be done in AR?"

2011 Aug 10
1
subqueries in sqlQuery function (package RODBC)
Hi R users. sorry for missing example and if question is to general but I am wondering if it is possible to execute subqueries in function sqlQuery (package RODBC) with opened connection with Excel or SQL server 2000. I couldn't find any example of this. And if it is possible what should be a correct syntax for this query: SELECT ct,COUNT(*) as n FROM (SELECT COUNT(*) AS ct FROM children
2006 Jan 25
4
Cannot :order when using :offset and :limit in find
Hello all. I am using the Paginate_with_ajax code as described on the wiki but I am running into the following problem. The following code will work fine and retrieved unsorted records in a hunky dory fashion: @componentlogs = Componentlog.find(:all, :conditions => [ "cl_compname like ?", @criteria ], :offset => offset, :limit => items_per_page ) However if I try and add an
2014 Sep 01
2
Escape comma in the LDAP passdb subquery configuration
Hi I have to configure the LDAP passdb to execute a subquery defining dinamically the new DN to use. For example: pass_attrs = @mail=mail=%{login_user},dc=%{login_domain},dc=example,dc=com,\ =proxy=y,\ =host=%{ldap:mailHost at mail} In the previous example, the problem is the use of "," for DN representation, which is also the separator for the attribute
2005 Jun 27
9
FK constraints overrated?
Hello folks, I use to think that a relational databases without foreign keys constraints enforced strictly by the RDBMS were no good, piece of crap, data junk. However, I''ve also learned the hard way that FKs constraints imposes serious difficulties when moving data around, specially between different DBs, or for loading test data or for upgrading DBs schemas, or for porting DBs
2016 Mar 27
2
PHP5 - Query Parsing Bug
I'm replying to a very old thread (9 years ago) here http://grokbase.com/t/xapian/xapian-discuss/072tprmr6h/php5-query-parsing-bug So not sure if that's going to end up being more or less readable... I have this error : Fatal error: No matching function for overloaded 'new_Query' in /usr/share/php/xapian.php on line 2607 Line 2607 (and surrounding) looks like this and are in
2006 Jun 12
4
Some help with fun SQL stuff...
I have one table that stores data related to math problems, and another table that stores users'' answers to those problems. To make this very simple, we''ll say that the math table has two numbers that get subtracted, and the answers table has a field that can either be "pos" or "neg" math _____ 2 5 8 3 Okay so if we do the math, we know that the
2009 Sep 16
3
find_by_sql - multiple selects, same statement SQL error
I''m trying to get the following statement to work using variable substitution (it works if hard-code the where (med_type) param in the inner SQL statement): med_type = ''game'' @mediaformats = MediaFormat.find_by_sql("select * from media_formats where media_formats.media_type_id = (select media_type_id from media_types where media_type = ?, :med_type) order by
2019 Jul 01
2
Variable expansion with variables containing '%' (ldap with 2.3.6)
Am Mon, 1 Jul 2019 13:08:46 +0300 (EEST) schrieb Aki Tuomi <aki.tuomi at open-xchange.com>: > Hi, > > there seems to be a problem when expanding variables containing a > single '%' in value in dovecot V2.3.6 > > having a user defined Variable in user_attrs like > > user_attrs = name=home=/maildir/%Ln, > =myvar=path/%L{ldap:sAMAccountName} > >
2017 Jan 12
2
NEAR non-leaf subqueries
Olly Betts writes: > On Wed, Jan 04, 2017 at 07:29:58AM +0100, Jean-Francois Dockes wrote: > > Olly Betts writes: > > > The ticket has a patch which attempts to handle the OR case (which seems > > > to be the part you actually care about) but this suffers from issues with > > > object lifetimes which get a bit involved in the details. Since there >
2017 Jan 04
2
NEAR non-leaf subqueries
Olly Betts writes: > On Thu, Dec 29, 2016 at 07:21:41PM +0100, Jean-Francois Dockes wrote: > > Xapian 1.2 supports a query like: > > > > (A OR B) NEAR (C OR D) > > > > and distributes the factors to create something like: > > > > (A NEAR 2 C) OR (B NEAR 2 C) OR (B NEAR 2 C) OR (A NEAR 2 C) > > > > Xapian 1.4 rejects such
2011 May 23
1
More relevance for recent documents
Good afternoon I would like to ask if is possible somehow give more relevance to the recent documents in search results. I dont want to sort results according to the date, I still prefer relevance, but I would like to see recent documents with better scoring. I was trying to add search query using AND_MAYBE, which should use relevance from both subqueries, but it didnt add any benefit to the
2017 Jan 20
2
NEAR non-leaf subqueries
Olly Betts writes: > On Thu, Jan 12, 2017 at 07:53:21PM +0100, Jean-Francois Dockes wrote: > > > Recoll also supports multi-word synonyms which could potentially > > generate PHRASE subqueries inside NEAR queries, but this > > understandably already did not work with 1.2, so the multi-word > > expansions are only used when proximity is not involved (by the way,
2006 Jun 20
2
Converting from acts_as_tree to acts_as_nested_set
I''m currently using acts_as_tree to display threaded Comments on my forums-like site. It''s waaay too slow to display a page with 1,000 comments, as it''s issuing a TON of selects. I''m pretty sure I want to convert to the nested set model, using acts_as_nested_set or acts_as_threaded. This should give me the performance I''m looking for. The problem,
2019 Jul 02
1
Variable expansion with variables containing '%' (ldap with 2.3.6)
On 2.7.2019 8.24, Aki Tuomi via dovecot wrote: > On 1.7.2019 13.37, Matthias Lay via dovecot wrote: >> Am Mon, 1 Jul 2019 13:08:46 +0300 (EEST) >> schrieb Aki Tuomi <aki.tuomi at open-xchange.com>: >> >>> Hi, >>> >>> there seems to be a problem when expanding variables containing a >>> single '%' in value in dovecot V2.3.6
2016 Dec 29
2
NEAR non-leaf subqueries
Hi, Xapian 1.2 supports a query like: (A OR B) NEAR (C OR D) and distributes the factors to create something like: (A NEAR 2 C) OR (B NEAR 2 C) OR (B NEAR 2 C) OR (A NEAR 2 C) Xapian 1.4 rejects such a query with the error message. OP_NEAR and OP_PHRASE only currently support leaf subqueries Because Recoll expands the terms to their stem siblings at query time, its NEAR queries
2006 Jan 30
1
find_by_sql and memcached
Is a find_by_sql query cached with memcached and cached_model (http://dev.robotcoop.com/Libraries/)? Looks like the answer is no. Is there a reason for this? I have a lot of very complicated querys with a lot of unions, subquerys and joins that would greatly benefit from the cache. Going through the code I can see that the find_by_sql method is changed in cached_model.rb, but it does not call
2006 Jan 17
4
find_by_sql column ordering defect?
Hello. I have a program that accesses a metadata (translation) table for column names as well as the ordering of columns for a specific model. Also in there is a collection of bool options such as column_visible_on_form, column_visible_on_screen_quicklist etc. The idea is that our customer can specify to a certain extent how their layout/user interface will appear. To accomplish this, I use
2006 Jun 15
8
postgresql sequence and migrations
I have a specific need to ''fixate'' my ''roles'' table sequence when migrating. at migration #4, I have 28 records in my roles tables and I can manually reset the roles_id_seq but it stands to reason that since I am doing everything else in the migration, I might as well reset the sequence there too. so I tried this in my migration file... execute
2010 May 01
1
I need some help joining data from 3 MySQL tables, please
Hi all, I am trying to display collective data from 3 MySQL tables: The query I have, so far, is SELECT c . * , COUNT( m.id ) AS `members` FROM `jos_mls_teams` AS `c` LEFT JOIN `jos_mls_teams_members` AS `m` ON m.teamid = c.id RIGHT JOIN ( SELECT u.name, u.lastvisitDate FROM `jos_users` AS `u` ) ON u.id = m.userid GROUP BY c.id LIMIT 0 , 30 But get the following error: #1248 - Every derived
2019 Jul 01
2
Variable expansion with variables containing '%' (ldap with 2.3.6)
Hi, there seems to be a problem when expanding variables containing a single '%' in value in dovecot V2.3.6 having a user defined Variable in user_attrs like user_attrs = name=home=/maildir/%Ln, =myvar=path/%L{ldap:sAMAccountName} and sAMAccountName conains a '%', in my example "sonder%zeichen" leads to: