Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. kernal

    Extract string before the first "-" it finds and the space prior to the "-"

    I have a field (i.e. TEST 100-001 Summer 2019) and I want to extract 100 from it. All help is appreciated!
  2. kernal

    AM/PM Datetime to Military Datetime

    Hi carp, I like kluge but it didn't work (results are blank and when I remove it then there are results). The field is a DateTm type. I was hoping that I could have it in my oracle query but I think I can use the program that I will be importing the data to summarize it, etc. to change the "."...
  3. kernal

    AM/PM Datetime to Military Datetime

    When I select the field "DTTM_STAMP" and look at "View SQL", it has "TO_CHAR(CAST((DTTM_STAMP) AS TIMESTAMP),'YYYY-MM-DD-HH24.MI.SS.FF')" (result example: 04/10/2019 3:16:59PM). I thought this expression "TO_CHAR(CAST(DTTM_STAMP) AS TIMESTAMP),'YYYY-MM-DD HH24:MI:SS') would work but it doesn't...
  4. kernal

    If there is a Fee on Class Level then that fee overrides Fee on Course Level

    Hi carp, It worked great! I really appreciate your help! Have a good day and be safe!
  5. kernal

    If there is a Fee on Class Level then that fee overrides Fee on Course Level

    The fees highlighted in red are the ones I need returned in the SELECT statement. Some classes will only have a "CLASS" or "COURSE" level but some will have both and if they have both then I only want to return the "CLASS" level. Class Level Type Nbr Amt [highlight #EF2929]TEST...
  6. kernal

    If Day of the Week='Y' (i.e. Mon='Y') and between a Start Date and End Date then Count #of Days

    I'm using Oracle 11. I have thousands of records so this is just a quick example: Table Nbr Mon Tues Wed Thurs Fri Sat Sun Start_Date End_Date 1 Y N Y N Y N Y 12/2/2019 12/14/2019 (Mon, Wed, Fri and Sun have 'Y') 2 N N Y Y N N N 12/4/2019 12/5/2019...
  7. kernal

    Change DATE and also a TIMESTAMP to just a date as 'MM/DD/YYYY. Also, need dummy date when null

    Change DATE and also a TIMESTAMP to just a date 'MM/DD/YYYY' Table1: Example in the date field: 2013-03-28 22:14:44. Need to have it as 03/28/2013 Table1 if null: 01/01/1900 Table 2: Example in the timestamp field in table2: 2010-01-02 00:00:00.000000. Need to have it as 01/02/2010 Help is...
  8. kernal

    Extract after and between spaces in a string

    Extract after and between spaces in a string 1. If I want to extract "in a string" so any string after the 5th space. 2. If I want to extract "between spaces" so any string between the 3rd space and 5th space. Help is appreciated. Thank you!
  9. kernal

    CONCAT DayofWeek Fields if Field Value =Y

    carp: Worked GREAT! Thank you
  10. kernal

    CONCAT DayofWeek Fields if Field Value =Y

    Dayofweek Values in the fields MON Y TUE Y WED N THU Y FRI N IF MON='Y' THEN 'M' IF TUE='Y' THEN 'T' IF WED='Y' THEN 'W' IF THU='Y THEN 'H' IF FRI='Y' THEN 'F' Results needed MTH since MON,TUE and THU has 'Y' Thank you for your help!
  11. kernal

    CONVERT DATE TIME 01/16/2018 10:30:08PM TO 2018-01-16 22:30:08

    How do I convert a datetime 01/16/2018 10:30:08PM TO 2018-01-16 22:30:08? Help is very appreciated!
  12. kernal

    Convert Attribute field from Rows into Columns Without Listing Them and No Aggregate

    In the future, new attributes could be added to the database so this is why I don't want to list them in a select statement. Table ID SUBJECT ATTRIBUTE 1 TEST CN 1 TEST TE 1 TEST AO 2 TESTING 3 PLACE_TEST CN Results wanted ID SUBJECT CN TE AO 1 TEST...
  13. kernal

    Is there any way to write a select statement for distinct when there is a CLOB field?

    Hi carp, Sorry for the late reply. So far, the field has 3,054 characters but it could increase and we need to show all of the CLOB. Thanks
  14. kernal

    Is there any way to write a select statement for distinct when there is a CLOB field?

    SELECT DISTINCT id, description FROM table" doesn't work because description is a CLOB field. Thanks for your help!
  15. kernal

    Effective Date Year < Year in a Different Table but Year is based on the 1st 3 Chars in String, e

    When I don't have Title as a field and in the GROUP BY ID Term Effective_Date(Year) 1 1175 2015 1 1145 2012 1 1135 2012 When I add Title as field and GROUP BY ID Term Effective_Date(Year) Title 1 1175 2015  Placement Testing (I just want this title in effective date's year 2015 since 2015 is...
  16. kernal

    Effective Date Year < Year in a Different Table but Year is based on the 1st 3 Chars in String, e

    Hi Bill, It works great if I don't have the TITLE as a field. When I add it then I get the error "ORA-00979: not a GROUP BY expression." Thanks for your help!
  17. kernal

    Effective Date Year < Year in a Different Table but Year is based on the 1st 3 Chars in String, e

    Are the results needed toward the bottom of this post, even possible? I hope I've explained it so it makes sense. TABLES: MAIN TABLE ID TITLE EFFECTIVE_DATE (This is in the table as string and not date) 1 Placement Testing 10/01/2015 1 Testing...
  18. kernal

    One record per person and that record would be the subject with the most classes per ID

    CSV FILE ID SUBJECT CLASS 1 art 100 1 art 101 1 test 500 2 art 501 3 rec 500 3 rec 502 3 rec 504 3 rec 600 3 lan 100 3 craft 100 Results wanted (Just the subject that has top #classes per id) ID...
  19. kernal

    Oracle NVL Look for Certain Value else blank Equivalent in Mysql

    In Oracle, I can have in the criteria: test_table.id = email_table.id (+) AND NVL(email_table.primary_email(+),'Y') WHAT IT DOES: If the test_table.id and email_table.id is the same and the email_table.primary_email='Y' then have 'Y' else '' in the email_table.primary_email results so...

Part and Inventory Search

Back
Top