What should I use to get only time in gridview I want to fetch only 03:42 but getting 01-01-1900 03:42:00 how to do this This is code cmd.CommandText = “select bumker1 Bumker_1, bumker2 Bumker_2, …
How to create 2 tables using EXECUTE IMMEDIATE only once?
I have a requirement where I need to create 2 tables inside a PLSQL block. Currently we’re using EXECUTE IMMEDIATE. Now the issue is I need to create 2 tables but I can use EXECUTE IMMEDIATE only once….
How to get highest value for each group by checking with two columns value
I have this table test_table below USER_ID | YEAR | MONEY ———————- 1 | 0 | 0 1 | 12 | 12 1 | 48 | 12 2 | 15 | 15 2 | 10 | 20 3 | 0 | …
Sqlcode of the cursor query in oracle
I have a oracle cursor with query CURSOR cursor IS SELECT column1 FROM table_name WHERE column1 = 48200; DBMS_OUTPUT.PUT_LINE(SQLCODE); I need the SQLCODE of the query in the cursor. I wrote without …
How can I filter on associated objects?
I want a filter on included/joined associated models. practice.patients.joins(‘ LEFT JOIN appointments on patients.id = appointments.patient_id LEFT JOIN patient_treatments on patients.id = …
SQL Server convert row values to columns
I have an SQL table like this Name1 Name2 Department1 Department2 Location1 Location2 ———————————————————————- Jhon Alex IT …
Trying to sum a series of rows based on FK relation loops
I have a database table that contains information about stories. I would like to be able to sum all of the word counts of stories in a series/all series to get the ‘true’ word count My table layout’s …
Using CASE WHEN to assign buckets
Fairly new to coding. I’ve created a new column that outputs the days a task is overdue using DateDiff. I then want to take the result of the DateDiff and assign it an expression (>60 days overdue, 30-…
SQL Finding result in one table based on a second table
I have two tables and I need to find all invoice that have a ready day of today and have no period in the INumber and all items have not been delivered. Each Invoice may have several rows in …
Need to join but on a secondary table
I have this one view all_people_expanded_view that has all the data needed except 1. The race of client is in race table. But the description is in race_info. I need to join on race on people_id, but …