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 Chriss 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: *

  • Users: kernal
  • Content: Threads
  • Order by date
  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

    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...
  3. 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...
  4. 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...
  5. 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...
  6. 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!
  7. 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!
  8. 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!
  9. 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...
  10. 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!
  11. 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...
  12. 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...
  13. 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...
  14. kernal

    Don't select ID\Term\Class if has more than 1 record on a day & depends on the last record's rea

    Table example for just 1 ID but there are thousands and thousands of records: ID TERM CLASSNBR REASON DATE TIME 1 1106 4444 Enrl 05/01/2010 11:00:00 1 1106 4444 Drop 05/01/2010 11:50:00 1 1106 4445 Enrl 05/01/2010 12:01:00 1 1106 4445...
  15. kernal

    Select Statement Using Subqueries?

    I need to find IDs that are taking courses where the course# is under 1000 and then they are also taking course#s greater or equal to 1000. Plus, they haven't taken courses in a term prior to 1066: Example: ID Term Course# 1 0986 1 1 1066 2 1 1078 1000 2 1068 99 2 1088 2002 2...
  16. kernal

    Retrieve records if they meet a certain criteria (1 record is <1000 and the other one >=1000)

    Two tables COMBINED term id number CLASS term dept catalog number DATA IN COMBINED term id number 1154 5555 10121 1154 5555 9587 1154 44444 5698 1154 44444 99999 DATA IN CLASS term dept catalog number 1154 ART 1000 10121 1154 ART 101 9587 1154 ART 2000 5698 1154 ART...
  17. kernal

    What export option do you select when the report is in multiple columns?

    I'm working with Crystal 9 and I've got the data in multiple columns but what export option do I select to export it? Thanks
  18. kernal

    Need to Calculate an Expiration Date depending on Purchase Dates for a Membership

    This is hard to explain so I hope I can and that I've worded it correctly. Need to calculate an expiration date: row_nbr id purchase_date expiration date that needs to be calculated 1 1 03/29/2012 03/29/2013 - add 1 year 2 1 02/19/2013 03/29/2014 - since this member...
  19. kernal

    Need to Calculate an Expiration Date depending on Purchase Dates for a Membership

    This is hard to explain so I hope I can and that I've worded it correctly. Need to calculate an expiration date: row_nbr id purchase_date expiration date that needs to be calculated 1 1 03/29/2012 03/29/2013 - add 1 year 2 1 02/19/2013 03/29/2014 - since this member...
  20. kernal

    Show when Data has Changed from One Day to the Next Day in CSV Files

    YESTERDAY'S "ID.csv" FILE: Term Class# ID 1162 2561 720580 1162 5222 568135 1162 5222 860444 1162 6555 568135 1162 6555 860444 1162 6555 565654 TODAY'S "ID_CURRENT.csv" FILE (I run the same query but when I download the new data to a CSV file, I name it "ID_CURRENT.csv" so I can...

Part and Inventory Search

Back
Top