New answers tagged

0 votes

pg_cron timezone issue, unable to run at specified time

I had the same problem with pg_cron version 1.4.2. I tried different combinations, setting the time zone in the config file, reinstalling the extension and reloading the database. After upgrading to ...
1 vote

Cannot find the object because it does not exist or you do not have permission

Permissions to the Server Agent's procedures are given by adding user to one of the fixed database roles: SQLAgentUserRole SQLAgentReaderRole SQLAgentOperatorRole Granting execute permission on a ...
  • 186
1 vote

How to update table keeping data available to users (Oracle)?

Browne's answer is correct, remove the first COMMIT. I want to add a second answer not because I disagree, but because you might consider another option altogether. Repeatedly deleting millions of ...
  • 130
1 vote
Accepted

How to update table keeping data available to users (Oracle)?

So how can I keep the older version of the data for the last 3 months available to the users of the table during update process? Remove the COMMIT, and Oracle's Multi-Version Read Concurrency take ...
1 vote
Accepted

Stored procedure to Insert data into table with select statement and argument parameter

The problem is the VALUES in your particular case. Use INSERT INTO SELECT. Query. insert into my_table (cart_id, product, sold_quantity ...
  • 3,029
1 vote
Accepted

Database Dependency Chart?

The answers will vary for SQL Server vs Oracle. For SQL Server, you can view dependencies of an object two ways: You can use SQL Server Management Studio (SSMS) and right click on the object. Then ...
  • 30.6k
4 votes
Accepted

ERROR: CREATE MATERIALIZED VIEW ... WITH DATA cannot be executed from a function

This is to ensure atomicity and consistency of operations. As stated in the source code comment, some statements must not run inside a transaction block, typically because they have non-rollback-...
  • 23.8k
4 votes
Accepted

SQL Server: how to get a stored procedure to execute tsql from output

You can use sp_executesql to execute your queries. Note the following: Ensure you correctly escape object names by using QUOTENAME, not just by enclosing in []. Any data which can be parameterized in ...
  • 8,860

Top 50 recent answers are included