Search Results

Search found 22653 results on 907 pages for 'case insensitive'.

Page 23/907 | < Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >

  • Rails: foreign_key that is set with a CASE WHEN mysql statement

    - by user305270
    belongs_to :removed_friend, :class_name => 'Profile', :foreign_key => "(CASE WHEN friendships.profile_id = #{self.id} THEN friendships.friend_id ELSE friendships.profile_id END)" The self.id its not working too :s it should be the id of the profile that is triggered the action. Anyway the main problem is that this foreign_key is not working and i got a mysql error. please help.. thanks

    Read the article

  • Any known orchard cms case studies ?

    - by Georges
    Hi, We're looking into using orchard cms for a project. I know the CMS hasn't been around for a long time, but I was wondering if there were any known high profile and successful case studies using orchard cms or its predecessor Oxite ? Thanks.

    Read the article

  • Single Table Inheritance (Database Inheritance design options) pros and cons and in which case it us

    - by Yosef
    Hi, I study about today about 2 database design inheritance approaches: 1. Single Table Inheritance 2. Class Table Inheritance In my student opinion Single Table Inheritance make database more smaller vs other approaches because she use only 1 table. But i read that the more favorite approach is Class Table Inheritance according Bill Karwin. My Question is: Single Table Inheritance pros and cons and in which case it used? thanks, Yosef

    Read the article

  • Web Security: Worst-Case Situation

    - by Yongho
    I currently have built a system that checks user IP, browser, and a random-string cookie to determine if he is an admin. In the worst case, someone steals my cookie, uses the same browser I do, and masks his IP to appear as mine. Is there another layer of security I should add onto my script to make it more secure?

    Read the article

  • How to use CASE in SQL , Syntax Error being shown

    - by Shantanu Gupta
    I am trying to retrieve some records from table based on my query but it shows me an error Msg 102, Level 15, State 1, Line 2 Incorrect syntax near ' select vd.LedgerId,(CreditAmt-DebitAmt) AS NET, CASE NET WHEN NET > 0 THEN 'Debit' WHEN NET < 0 THEN 'Credit' ELSE 'Nil'End from dbo.vdebit vd INNER JOIN dbo.vCredit vc ON vd.LedgerId=vc.LedgerId

    Read the article

  • Notification in case of data changes in SQL and Oralce

    - by user171523
    I am in the process of building a system where i need to notify a Window Service a .net based application in case of any change in the DB table (Insert , Update , Delete). I know this can be done with the ADO.NET Events in SQL. Is there any common solution for Oracle and SQL which can provide this kind of notifications. This needs to happen as and when the update happens on real time basis.

    Read the article

  • Case Order by using Null

    - by molgan
    Hello I have the following test-code: CREATE TABLE #Foo (Foo int) INSERT INTO #Foo SELECT 4 INSERT INTO #Foo SELECT NULL INSERT INTO #Foo SELECT 2 INSERT INTO #Foo SELECT 5 INSERT INTO #Foo SELECT 1 SELECT * FROM #Foo ORDER BY CASE WHEN Foo IS NULL THEN Foo DESC ELSE Foo END DROP TABLE #Foo I'm trying to produce the following output: 1 2 3 4 5 NULL "If null then put it last" How is that done using Sql 2005 /M

    Read the article

  • Finding spelling of an element in an ignore case dictionary

    - by Andrew White
    Hi, Weird question, but I have a dictionary created with StringComparer.OrdinalIgnoreCase, looks something like this AaA, 10 aAB, 20 AAC, 12 I then use myDictionary["AAA"] to find the value associated with the key, but what I also need to know is what the actual spelling of the key is in myDictionary, e.g. in this case I want it to return AaA. Any way to do this without a loop? Thx.

    Read the article

  • Using CASE Statements in LEFT OUTER JOIN in SQL

    - by s khan
    I've got a scenario where I want to switch on two different tables in an outer join. It goes something like this:- select mytable.id, yourtable.id from mytable left outer join (case when mytable.id = 2 then table2 yourtable on table1.id = table2.id else table3 yourtable on table1.id = table3.id end) ...but it doesn't work. Any suggestions?

    Read the article

  • SQL CASE WHEN NULL - question

    - by cc0
    Ok, so I'm trying to select an amount of rows from a column that holds the value 3, but only if there are no rows containing 10 or 4, if there are rows containing 10 or 4 I only want to show those. What would be a good syntax to do that? So far I've been attempting a CASE WHEN statement, but I can't seem to figure it out. Any help would be greatly appreciated. (My database is in an MS SQL 2008 server)

    Read the article

  • SQL inserting value of a specific column under multple case

    - by Lo Wai Lun
    Suppose I have got a table which I have to insert the description of the contract under different keys of contract. But when executing, there is a n error near then Is there any limitation of using syntax set ? The below is my SQL declare @i int, @j v nvarchar(MAX) set @i = 1 while (@i<=8) begin set @j = case when @i = 1 then 'CR' when @i = 2 then 'Facebook' else 'N/A' end INSERT INTO CostNature (CNKey, CNNDescription) VALUES (@i , @j ); set @i = @i + 1 end

    Read the article

  • Find a base case for a recursive void method

    - by Evan S
    I am doing homework. I would like to build a base case for a recursion where ordering given numbers (list2) in ascending order. Purpose of writing this codes is that when all numbers are in ascending order then should stop calling a method called ascending(list2, list1); and all values in list2 should be shipped to list1. For instance, list2 = 6,5,4,3,2,1 then list2 becomes empty and list1 should be 1,2,3,4,5,6. I am trying to compare result with previous one and if matches then stop. But I can't find the base case to stop it. In addition, Both ascending() and fixedPoint() are void method. Anybody has idea? lol Took me 3 days... When I run my code then 6,5,4,3,2,1 5,6,4,3,2,1 4,5,6,3,2,1 3,4,5,6,2,1 2,3,4,5,6,1 1,2,3,4,5,6 1,2,3,4,5,6 1,2,3,4,5,6 1,2,3,4,5,6 1,2,3,4,5,6 infinite............. public class Flipper { public static void main(String[] args) { Flipper aFlipper = new Flipper(); List<Integer> content = Arrays.asList(6,5,4,3,2,1); ArrayList<Integer> l1 = new ArrayList<Integer>(content); ArrayList<Integer> l2 = new ArrayList<Integer>(); // empty list aFlipper.fixedPoint(l2,l1); System.out.println("fix l1 is "+l1); System.out.println("fix l2 is "+l2); } public void fixedPoint(ArrayList<Integer> list1, ArrayList<Integer> list2) { // data is in list2 ArrayList<Integer> temp1 = new ArrayList<Integer>(); // empty list if (temp1.equals(list2)) { System.out.println("found!!!"); } else { ascending(list2, list1); // data, null temp1 = list1; // store processed value System.out.println("st list1 is "+list1); System.out.println("st list2 is "+list2); } fixedPoint(list2, list1); // null, processed data }

    Read the article

  • How to do a case sensitive GROUP BY?

    - by Abe Miessler
    If I execute the code below: with temp as ( select 'Test' as name UNION ALL select 'TEST' UNION ALL select 'test' UNION ALL select 'tester' UNION ALL select 'tester' ) SELECT name, COUNT(name) FROM temp group by name It returns the results: TEST 3 tester 2 Is there a way to have the group by be case sensitive so that the results would be: Test 1 TEST 1 test 1 tester 2

    Read the article

  • Execute a default task in ANT in case of failure

    - by elos
    Hi, I'm currently using ANT for building my Java project on a Windows XP machine. In my build.xml file I've defined 3 task and I would like that,in case of fail,a default task be executed before closing the building and exiting (like a recovery procedure). I would like to know if it's possible. thanks

    Read the article

< Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >