Skip to content

Tag: database

SQL Query Confused

Display: account no. customer id initial amount in terms of lakhs (rounded off to 2 decimals) [change the column heading to ‘INITIALAMTIN_LAKHS’] amount category(amt < 50000 show as 'Low', amt > …

insert if not exists in HQL

I am trying to write a query in HQL which can insert a record if it does not exists (with same name) so that there is no duplicate insertion when done from multiple threads. However, the record is not inserted. I suspect this is because the table is empty and the subquery returns 0 records despite the NOT EXI…

Invalid object name in SQL Management Studio

I’ve been creating a database for class and I’m having trouble seeing my tables. I have a total of 12 tables I have created, 3 via CREATE TABLE statements and the rest using the SQL Server Management Studio, I’m trying to enter an INSERT INTO statement but it’s not recognizing the tabl…