r/learnSQL • • Oct 21 '25

SQL Query Problems (OBIEE R&A)

4 Upvotes

Hi everyone!

I'm working to create a data model in Oracle R&A and I'm really stuck. I wrote this so far:

SELECT "Property Details"."Property Name" AS Property_Name,

"Details"."Arrival Date" AS Arrival_Date,

"Details"."Number of Nights" AS Number_of_Nights,

"Details"."Departure Date" AS Departure_Date,

"Daily Details"."Stay Date" AS Stay_Date,

"Details"."Reservation Status" AS Reservation_Status,

"Stay Details"."Reservation Type" AS Reservation_Type,

"Profiles-Individuals - Guest Details"."Last Name" AS Last_Name,

"Profiles-Individuals - Guest Details"."First Name" AS First_Name,

"Stay Details"."Adults" AS Adults,

"Stay Details"."Children" AS Children,

"Daily Details"."Block Code" AS Block_Code,

"Profiles-Company - Account Information"."Account ID" AS Company_ID,

"Profiles-Company - Account Information"."Account Name" AS Company_Name,

"Profiles-Travel - Account Information"."Account ID" AS Travel_Agency_ID,

"Profiles-Travel - Account Information"."Account Name" AS Travel_Agency_Name,

"Profiles-Source - Account Information"."Account ID" AS Source_ID,

"Profiles-Source - Account Information"."Account Name" AS Source_Name,

"Details"."Confirmation Number" AS Confirmation_Number,

"Room"."Room Type" AS Room_Type,

"Rates"."Rate Code" AS Rate_Code,

"Daily Details"."Rate" AS Rate,

"Daily Details"."Effective Rate" AS Effective_Rate,

"Packages"."Package Code" AS Package_Code

FROM "Bookings-Reservation"

WHERE"Details"."Arrival Date" >= :p_ArrDate_From

AND "Details"."Arrival Date" <= :p_ArrDate_To

AND "Daily Details"."Stay Date" >= :p_StayDate_From

AND "Daily Details"."Stay Date" <= :p_StayDate_To

AND "Property Details"."Property Name" IN (:p_Property)

AND "Details"."Reservation Status" IN (:p_ResStatus)

AND "Details"."Confirmation Number" IN (:p_ConfNo)

AND "Room"."Room Type" IN (:p_RoomType)

AND "Rates"."Rate Code" IN (:p_RateCode)

AND "Packages"."Package Code" IN (:p_PackageCode)

AND "Profiles-Company - Account Information"."Account Name" IN (:p_Company)

AND "Profiles-Travel - Account Information"."Account Name" IN (:p_TravelAgency)

AND "Profiles-Source - Account Information"."Account Name" IN (:p_Source)

But it keeps telling me that a comparison between DATE and VARCHAR is not possible.

For sure I'm doing something wrong, but I worked at a different SQL but with the same logic and 0 problems...

Do you guys know where is the problem?

Thank you in advance


r/learnSQL • • Oct 19 '25

SQL query - OBIEE Reporting and Analytics

4 Upvotes

Hi guys, I'm working on a SQL in order to generate a report in Oracle Reporting and Analytics. Does any of you know anything about this world?

Thank you in advance


r/learnSQL • • Oct 18 '25

HELP! EXCEL IMPORT

0 Upvotes

I’m trying to import information from Excel to MySQL workbench. I’m running into an issue. My Excel has null values and I already allowed on my schema in sql for that column to allow null values but when I’m trying to transfer from Excel to sql when I’m importing with the wizard it completely disregard the Rows that have null values and I’ve tried everything and it’s not working. Help me


r/learnSQL • • Oct 18 '25

Help! Can we solve this with the demo or do we need to log in with a profile ?

2 Upvotes

So long story short we have a grop assignment. and only one of the 5 members has the log in details. The assignment was to import data from SQL and then design an entity relationship diagram showing entities relationships cardinality and required fields.

Well, we decided that we would split up the work and the collegue who has the log in details to do the first step of importing the data and providing us with the sheet. Then me and my other collegue would do the diagram and the other two are doing the rest of the tasks/presentation. So now we run into an error that said that there is a duplicate column name. We asked her to change it in SQL in order to continue with the task. She said it can be done also in the excel sheet that she gave us. (it can not be changed lol)

Mind you this is our first experience with SQL and we don't know that much about how this works and what can be done in the demo or not. And now she isn't responding anymore and also refuses to give us the correct log in details. Is there a way to do the diagram in the demo? I mean for that we would first need to correct the data bc otherwise we would get the ERROR message again. Our professor is also not responding and the other teammates are getting anxious bc they can't do their parts. Ahhh could someone enlighten us what to do? And what would work to solve this issue?


r/learnSQL • • Oct 18 '25

How pgAssistant and AI can help you design better PostgreSQL Tables — Following the Main RFCs

Thumbnail reddit.com
1 Upvotes

r/learnSQL • • Oct 17 '25

Live session: "SQL Crash Course for Beginners" with Alice Zhao, next week on Thursday Oct 23. She'll cover core SQL concepts and then you can ask her questions. 100% free event.

Thumbnail reddit.com
3 Upvotes

r/learnSQL • • Oct 17 '25

Looking for multiple books to learn SQL and database internals — design, engines, performance + exercises

Thumbnail reddit.com
1 Upvotes

r/learnSQL • • Oct 16 '25

Can I learn SQL for free?

77 Upvotes

I really want to get into SQL, but every website I try I have to pay after I get through the first few steps. I see a lot of people recommend YouTube, but I learn better from actually doing it myself. Does anyone know of any websites that offers SQL courses for free. Any help would be greatly appreciated.


r/learnSQL • • Oct 17 '25

Please try my SQL previewer

1 Upvotes

Hi. I developed a SQL previewer as a class project with 20 examples of basic SQL code. The code runs entirely in your browser so you don't have to install or sign up for anything. It uses PGLite which in turn uses PG17. The URL for the live demo is https://sean.brunnock.com/SQL/Examples/Basic/. The source code is at https://github.com/brunnock/PgExamples.

If you could be so kind as to leave feedback either here on the Github repo, I'd be appreciative. It counts toward my grade. Thanks!