+ Reply to Thread
Results 1 to 6 of 6

Thread: SQL Case

  1. #1

    Default SQL Case

    In your SELECT CASE.... and WHERE clauses CDE has not matched selection criteria: '100','200', '300' and '00100', '00802'... If '00100', '00802'.. is not CDE, but another field CDEXX use temporary table method as shown in example. This SQL applies only to predefined (hardcoded) CDE values '100','200', '300'. I am not sure if you could use sofcoding to get result within only one SQL statement.
    Code

  2. #2

    Default SQL Case

    Oooops.. Apparently in my example Customer field is missing in select clause.
    Code

  3. #3
    Guest.Visitor Guest

    Default SQL Case

    There was little mistyping in my code. I tried your code but still it is not working. The correct code is below The Operational Navigator SQL Editor does not give any errors (strange)
    Code

  4. #4

    Default SQL Case

    If you will take close look at both codes, the difference is your new selection criteria and field names. My code was tested and it worked fine.

  5. #5
    Guest.Visitor Guest

    Default SQL Case

    Hi, The Code Below is working Fine but I need little more refinement. It shows four column at the end FileDate, CustomerID, Act , Red I want to show some more columns based on the country. Suppose there is only two country US/CAN. FileDate, CustomerID, CanAct, CanRed, USAct, USRed Is it possible to show like that? Thanks
    Code

  6. #6
    Guest.Visitor Guest

    Default SQL Case

    Hi, I am stuck with this SQL Sum/Case Problem. Kindly help. I need a cross tab solutions as in MS. Access Data is like
     Customer Code Amount ======= ==== ====== 12345 100 50 12345 100 55 12345 200 100 12345 200 100 12345 200 100 12345 300 300 11111 100 200 11111 200 500 11111 300 300 11111 300 300 
    Result should be like that
     Customer R100 R200 R300 ================================= 12345 105.00 300.00 300.00 11111 100.00 500.00 600.00 
    Kindly guide Thanks
    Code

+ Reply to Thread

Similar Threads

  1. Lower case - Upper case problem
    By Guest.Visitor in forum RPG
    Replies: 1
    Last Post: 02-23-2004, 04:47 AM
  2. Convert Case
    By J.Wells in forum Programming
    Replies: 4
    Last Post: 06-20-2001, 07:10 AM
  3. Help with Business Case
    By Guest.Visitor in forum Analysis
    Replies: 16
    Last Post: 11-29-2000, 06:14 AM
  4. Convert lower case to Upper case(COBOL/400)
    By Guest.Visitor in forum Application Software
    Replies: 3
    Last Post: 05-25-2000, 09:27 AM
  5. CASE and Grouping
    By Guest.Visitor in forum Programming
    Replies: 5
    Last Post: 01-11-2000, 01:46 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts