» Home » condition » Page 1
Restrictions.Disjunction() between condition a AND condition b OR condition c AND condition d
Category : Development Tools & Services

How can I create a disjunction in NHibernate that would accomplish the following sql:


Select * from MyTable
Where (conditionA = true AND conditionB = true)
OR (conditionC = true AND conditionD = true)


From what I've seen, the Disjuntion() takes single criterions and "ORs" them together. Is it possible to group to criterion together and "OR" it against anothe


View Replies


How to write hive regex to match condition 1 OR condition 2 and return whichever matches?
Category : Programming Languages

I need to have "or" logic in my regexp.


For example, from "foobar435" I would need the three numbers, so "435"
But from "barfoo543" I would need the three letters before the three numbers, so "foo"

Individually, the regexes would be "foobar([0-9]){3}" to get the first case, and "[a-zA-Z]{3}([0-9]{3})[a-zA-Z]{3}" to get the second case. How do I get both cases at once with


View Replies


In Perl, I need to read a .conf file that contains condition like $a>$b based on the result of the condition i have to execute either if or else bl
Category : Programming Languages

The content of condition.conf:


condition1=$a>$b

Example Perl code:


$cnd_ConfFile = $ARGV[0];
open(CONDITIONS, '<', $cndConfFile);
$cndCount=0;
while ( <CONDITIONS> ) {
chomp; # no newline
s/#.*//; # no comments
s/^s+//; # no leading white
s/s+$//; # no t

View Replies


Magento Shopping Cart Rule Condition - Custom condition quote id
Category : Programming Languages

I want dynammically create a shopping cart rule to apply to particular quote id.


Any suggestion to do that?


View Replies


In hibernate using CriteriaBuilder how to add condition to left join immediately and not as part of where condition?
Category : Programming Languages

I want criteriabuilder to put AND condition immediately with join (1st left join in below query).
But When I put condition in predicate it adds if to final where clause.


I want output like this:


select
*
from
milestone milestone0_
left outer join
disc_user_milestone_watch userswatch1_
View Replies


Fast way to find a intersection between two sets of numbers, one defined by a bitwise condition and another by an arithmetic condition
Category : Coding

This is probably well covered ground, but I'm ignorant on the subject so I'll be using amateurish terminology. Let's say I'm messing around with some set of conditions that each define a non-zero set of numbers within an int, let's just say 8-bit int. So for a bitwise one, I may have this:


11XX00XX

Saying that I want all bytes that have 1s where there are 1


View Replies


Custom search query : edismax(user_entered_search_keywords) AND (condition A OR condition B)
Category : Coding

My edismax is running perfect and it handles the query formation internally when i just pass the search keywords to dismax.


The next step of my implementation is a custom query where let dismax do all the mumbo jumbo on those search keywords, but AND the dismax query with a custom condition.


When I was not using dismax, i use to create my own queries manually e.g. (keywo


View Replies


How to write Zend db select with OR condition inside AND condition
Category : Programming Languages

Can someone guide me to write a query like below using Zend db select :


SELECT `tbl_md_users`.*
FROM `tbl_md_users`
WHERE
user_type <> 'TYPE1')
AND (first_name LIKE '%tom%' OR last_name LIKE '%tom%' OR user_name LIKE '%tom%')

View Replies


Select row matching a condition if no other rows match a different condition
Category : Databases

Very basic, but didn't know what this type of query is called...I want a query that will basically do this (pseudo-SQL):


SELECT name
FROM Table
WHERE activity_status != 'active'
AND there are no rows with that same name where activity_status = 'active'

(in other words, return names of the inactive only when not one with that name i


View Replies


Rails - How do I write this string condition as an array condition
Category : Programming Languages
named_scope :correct, :include => :correction, :conditions => "checked_at IS NOT NULL AND corrections.id IS NULL"

On a side note I have googled loads and looked through books but i cant seem to find a list of all the various types of conditions you can use and how they differ when implenting them as strings, arrays or hashes.


Is there a list of the synt


View Replies


Next
2012 / 2017 Copyrights BigHow , All Rights Reserved .