Useful tips for everyday
How do I find the last executed SQL statement in SQL Server? Syntax SELECT. deqs.last_execution_time AS [Time], dest.TEXT AS [Query] FROM. sys.dm_exec_query_stats AS deqs. CROSS…
How do I find column names for all tables in all databases in SQL Server? You can use following query to list all columns or…
How do I login as another user in Oracle? Basically you can grant the privilege to users to connect as another user. SQL> alter user…
How do you handle errors in SSIS? In the control flow area, add a data flow task and rename it as [Learn Error Handling]. Right-click…
Does staging table have primary keys? Staging Table has 2 primary keys defined for Unique Identifier. Should primary key be clustered? By default a primary…
Can you have two left joins in one query? Yes, indeed! You can use multiple LEFT JOINs in one query if needed for your analysis.…
How do I calculate between 2 values? To calculate the percentage increase: First: work out the difference (increase) between the two numbers you are comparing.…
How to import multiple CSV files to SQL Server? It also deals with data schema changes, creates table and allows you to preprocess data. It…
Is there a query that takes too long? I have one query that taking too long, that is 60 minutes. I am programmer but i…
How do you use subquery results? You can use a subquery in a SELECT, INSERT, DELETE, or UPDATE statement to perform the following tasks: Compare…