Search Results

Search found 24201 results on 969 pages for 'andrew case'.

Page 19/969 | < Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >

  • Lucene.Net Keyword based case insensitive query ?

    - by Yoann. B
    Hi, I need to make a Lucene exact case insensitive keyword match query. I tried using KeywordAnalyzer but it's case sensitive ... Sample : Keyword : "Windows Server 2003" = Got Results Keyword : "windows server 2003" = No results ... Another sample (multi keywords) : Keywords : "ASP.NET, SQL Server" = Got results Keywords : "asp.net, sql server" = No results

    Read the article

  • Mysql CASE and UPDATE

    - by Rosengusta Garrett
    I asked yesterday how I could update only the first column that was empty. I got this of a answer: UPDATE `names` SET `name_1` = CASE WHEN `name_1` = '' then 'Jimmy' else `name_1` end, `name_2` = CASE WHEN `name_1` != '' and `name_2` = '' then 'Jimmy' else `name_2` end I tried it and it ended up updating every column with 'Jimmy' what's wrong with this? I can't find anything. It could possibly be the structure of the database. So here is what each name_* column is setup like: # Name Type Collation Attributes Null Default Extra 1 name_1 varchar(255) latin1_swedish_ci No None

    Read the article

  • switch case in where clause

    - by Nimesh
    hi, i need to check three conditions: if @filter = 1 { **select * from employeestable where rating is not null** } else if @filter = 2 { **select * from employeestable where rating is null** } else { **select * from employeestable** } This i need to do using a case statement. now i have more than 30 lines of query, if i use case i can reduce my code upto 70% Please let mek now how can i do this.

    Read the article

  • How to make my URL mapping case insensitive?

    - by fabien7474
    Grails, by default, is case-sensitive when mapping URL to controller actions or views. For instance, www.mywebsite.com/book/list will work BUT www.mywebsite.com/Book/list will return a 404 page. What can I do (code snippets are welcomed) to make my URL case-insensitive (i.e. www.mywebsite.com/Book/list being a valid url) ?

    Read the article

  • SQL CASE Question

    - by docsql
    Hiya, I dont know if this can be done but i'd though i'd ask. What I want to do is have a case statement query and if a 1 begin another action. if 0 dont do anything. For Example select CASE WHEN client.deathofdeath = yes THEN 1 do another select in here (which is another table) Else 0 End AS DeathDate From Client client Can this be done?

    Read the article

  • how to make oracle case insensitive

    - by yuri
    Can there be a setting on Oracle 10g to consider data as case insensitive? I saw a solution here. However, that is done on a session. What I am looking for is a setting either on a schema or on a table to consider it's data as case insensitive. If it is on a session then I will have to make the change on all the stored procedures.

    Read the article

  • Combining multiple condition in single case statement in Sql Server

    - by swetha
    According to the following description i have to frame a case ...End statement in Sql server ,help me to frame a complex case..End statement to fulfil the following condition. if PAT_ENT.SCR_DT is not null and PAT_ENTRY.ELIGIBILITY is null then display display 'Favor' if PAT_ENT.SCR_DT is not null and PAT_ENTRY.EL is equal to No, display 'Error' if PAT_ENTRY.EL is Yes and DS.DES is equal to null or OFF, display 'Active' if DS.DES is equal to N, display 'Early Term' if DS.DES is equal to Y, display 'Complete' Thanks in advance.

    Read the article

  • Base Case in a recursive method

    - by Shaza
    Hey all, About my question, I'm asking a theoretical question here about Base case or the halting case in a recursive method, what's its standards? I mean, is it standard not to have body in it, just a return statement? Is it always like the following: If(input operation value) return sth; Do you have different thoughts about it??

    Read the article

  • Switch Statement Case Evaluation?

    - by TheDarkIn1978
    i would like to have cases that evaluate the expression in my switch statement. is this not possible? switch (zSpeed) { case (zSpeed > zMax): this.zSpeed = zMax; break; case (zSpeed < 0): this.zSpeed = 0; break; default: this.zSpeed = zSpeed; }

    Read the article

  • how to ensure comparison is case sensitive?

    - by newguy
    Hi there, im trying to do a comparison in MYSQL but wish for it to be case sensitive ex: $userID="test" $q = db_query("select * from users where user_id = '" . $userID . "'"); In DB: userid = "TEST" Ho do i go about making sure the mysql query does not return TRUE for this query as the userid varialbe doesnt match the case of the userid in the database thanks

    Read the article

  • how to reuse a CASE in the WHERE ?

    - by Thibault Witzig
    Hello I'm trying to do a request that looks like this SELECT field1, field2, field3 = CASE WHEN field2 = 'something' THEN 'something' WHEN field1 IS NOT NULL and field2 IS NULL THEN 'somethingElse' ELSE NULL END FROM SomeTable WHERE field3 IS NOT NULL This results in a syntax error. I have to rewrite the CASE in the WHERE instead of just refering to it. Is there a better way to achieve this ? And out of curiosity, why is "WHERE field3 IS NOT NULL" refused while for example "ORDER BY field3" would pass ?

    Read the article

  • SQL SERVER – Implementing IF … THEN in SQL SERVER with CASE Statements

    - by Pinal Dave
    Here is the question I received the other day in email. “I have business logic in my .net code and we use lots of IF … ELSE logic in our code. I want to move the logic to Stored Procedure. How do I convert the logic of the IF…ELSE to T-SQL. Please help.” I have previously received this answer few times. As data grows the performance problems grows more as well. Here is the how you can convert the logic of IF…ELSE in to CASE statement of SQL Server. Here are few of the examples: Example 1: If you are logic is as following: IF -1 < 1 THEN ‘TRUE’ ELSE ‘FALSE’ You can just use CASE statement as follows: -- SQL Server 2008 and earlier version solution SELECT CASE WHEN -1 < 1 THEN 'TRUE' ELSE 'FALSE' END AS Result GO -- SQL Server 2012 solution SELECT IIF ( -1 < 1, 'TRUE', 'FALSE' ) AS Result; GO If you are interested further about how IIF of SQL Server 2012 works read the blog post which I have written earlier this year . Well, in our example the condition which we have used is pretty simple but in the real world the logic can very complex. Let us see two different methods of how we an do CASE statement when we have logic based on the column of the table. Example 2: If you are logic is as following: IF BusinessEntityID < 10 THEN FirstName ELSE IF BusinessEntityID > 10 THEN PersonType FROM Person.Person p You can convert the same in the T-SQL as follows: SELECT CASE WHEN BusinessEntityID < 10 THEN FirstName WHEN BusinessEntityID > 10 THEN PersonType END AS Col, BusinessEntityID, Title, PersonType FROM Person.Person p However, if your logic is based on multiple column and conditions are complicated, you can follow the example 3. Example 3: If you are logic is as following: IF BusinessEntityID < 10 THEN FirstName ELSE IF BusinessEntityID > 10 AND Title IS NOT NULL THEN PersonType ELSE IF Title = 'Mr.' THEN 'Mister' ELSE 'No Idea' FROM Person.Person p You can convert the same in the T-SQL as follows: SELECT CASE WHEN BusinessEntityID < 10 THEN FirstName WHEN BusinessEntityID > 10 AND Title IS NOT NULL THEN PersonType WHEN Title = 'Mr.' THEN 'Mister' ELSE 'No Idea' END AS Col, BusinessEntityID, Title, PersonType FROM Person.Person p I hope this solution is good enough to convert the IF…ELSE logic to CASE Statement in SQL Server. Let me know if you need further information about the same. Reference: Pinal Dave (http://blog.sqlauthority.com)Filed under: PostADay, SQL, SQL Authority, SQL Function, SQL Query, SQL Server, SQL Tips and Tricks, T SQL

    Read the article

  • How to determine the correct (case sensitive) URL for a SharePoint site

    - by Goyuix
    SharePoint is generally very tolerant of accepting a URL in a case-insensitive fashion, however there are a few cases where it completely breaks down. For example, when creating a site column it somehow stores and uses the URL when it was created, and when trying to edit the field definition through the Site Column Gallery (fldedit.aspx page in the LAYOUTS) you end up throwing the error below. Value does not fall within the expected range. at Microsoft.SharePoint.SPFieldCollection.GetFieldByInternalName(String strName, Boolean bThrowException) at Microsoft.SharePoint.SPFieldCollection.GetFieldByInternalName(String strName) at Microsoft.SharePoint.ApplicationPages.BasicFieldEditPage.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) How can I reliably get the correct URL for a site/web? The SPSite.Url and SPWeb.Url properties seem to return back whatever case they are instantiated with. In other words, the site collection is provisioned using the following URL: http://server/Path/Site If I create a new Site Column using the SharePoint object model and happen to use http://server/path/site when instantiating the SPSite and SPWeb objects, the site column will be made available but when trying to access it through the gallery the error above is generated. If I correct the URL in the address bar, I can still view/modify the definition for the SPField in question, but the default URL that is generated is bogus. Clear as mud? Example code: (this is a bad example because of the case sensitivity issue) // note: site should be partially caps: http://server/Path/Site using (SPSite site = new SPSite("http://server/path/site")) { using (SPWeb web = site.OpenWeb()) { web.Fields.AddFieldAsXml("..."); // correct XML really here } }

    Read the article

  • NSPredicate case-insensitive matching on to-many relationship

    - by Brian Webster
    I am implementing a search field where the user can type in a string to filter the items displayed in a view. Each object being displayed has a keywords to-many relationship, and I would like to be able to filter the objects based on their keywords. Each keyword object has a name property, so I've set up an NSPredicate to do the filtering that looks like this: NSPredicate* predicate = [NSPredicate predicateWithFormat:@"keywords.name CONTAINS %@", self.searchString]; This works, but the problem is that the search is case-sensitive, so if the keyword has a capital letter but the user types in all lowercase, no matches are found. I've tried the following modification: NSPredicate* predicate = [NSPredicate predicateWithFormat:@"keywords.name CONTAINS[c] %@", self.searchString]; But that doesn't make any difference in the case sensitivity of the matching. Is there a way to do this case-insensitive matching using just a plain predicate? Or will I need to implement some sort of custom accessor on the keyword class, e.g. write a lowercaseName method and match against a lowercased version of the search string instead? Addendum: After further exploration, the workaround of adding a custom accessor works OK for manual use of NSPredicate, but does not work at all when using NSFetchRequest with Core Data, which only works when querying attributes defined in the Core Data model.

    Read the article

  • How does this Switch statement know which case to execute? (PHP/MySQL)

    - by ggfan
    Here is a code form a PHP+MySQL book I am reading and I am having trouble understanding this code. This code is about checking a file uploaded into a database. (Please excuse any spelling errors if any, I was typing it in) Q1: How does it know which case to echo? In the whole code, there is no mention of each case. Q2: Why do they skip case 5?! Or does it not matter which numbers you use(so I can have case 1, case 18, case 2?) if($_FILES['userfile']['error']>0) { echo 'Problem: '; switch($_FILES['userfile']['error']) { case 1: echo 'File exceeded upload_max_filesize'; break; case 2: echo 'File exceeded max_file_size'; break; case 3: echo 'File only partially uploaded'; break; case 4: echo 'No file uploaded'; break; case 6: echo 'Cannot upload file: no temp directory specified'; break; case 7: echo 'Upload failed: Cannot write to disk'; break; } exit; }

    Read the article

< Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >