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...
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...
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...
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...
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!
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!
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.