|
|
|
|
|
|
|
Question of the Day |
Today's question (by Steve Jones - SSC Editor): | |
Transient Synonyms | |
On SQL Server 2017, I run this code in a batch to create a temp table:
CREATE TABLE #songs ( songid INT, title VARCHAR(200), releasedate DATE, genre VARCHAR(100));I then do this: CREATE SYNONYM SongStaging FOR #songsNow I drop the temp table. DROP TABLE #songsMy ETL process will recreate the temp table using the code above when it runs. This stored procedure is then called: CREATE PROCEDURE dbo.LoadSongs AS INSERT Songs ( songid, title, releasedate, genre ) SELECT songid, title, releasedate, genre FROM dbo.StagingSongs WHERE title NOT IN (SELECT title FROM Songs) GOI then run the ETL process and the stored proc, what happens during this flow? | |
Think you know the answer? Click here, and find out if you are right. |
Yesterday's Question of the Day (by Steve Jones - SSC Editor) |
Restoring Expired Certificates I have a certificate that is used for TDE in my SalesSQL instance. This certificate expired last month. I now need to restore a backup of this certificate on a different instance for a DR test. What happens when I run the CREATE CERTIFICATE FROM FILE command on the new instance using a backup of the expired certificate? Answer: The certificate is created with a warning about the expired certificate Explanation: The certificate will be created, but a warning is returned that the certificate is expired. Ref: CREATE CERTIFICATE - https://docs.microsoft.com/en-us/sql/t-sql/statements/create-certificate-transact-sql?view=sql-server-2017 |
Database Pros Who Need Your Help |
Here's a few of the new posts today on the forums. To see more, visit the forums. |
SQL Server 2017 - Administration |
business intelligence development studio(Bids) - Hello, I have a SQL 2017 and I want to use business intelligence development studio(Bids), I dont see the App on the start menu. Integration service are exist. Tanks! |
SQL Server Upgrade - I have old physical SQL Server which is less than 2 yrs old, so we are planning to upgrade to SQL 2017/2019. So thinking of using the same old physical SQL Server for the upgrade. Would need to load the new windows version and SQL Server. Do you see any reason that it should not […] |
SQL Server 2017 - Development |
SSAS - Aggregation issue: “N/A” members be excluded from Excel “Grand Total " - We’ve build a Finance OLAP Cube in SSAS which is mostly used/browsed by Accountants. Due to a “self-service” policy that is followed, users are in the meantime required to make use of Excel (with a data connection to the cube) as their reporting and/or analysis tool. One of the dimensions, the Accounts dimension, contains the […] |
SSIS - Adding Columns to existing table and load data - I am working in SSIS (Sql server version 2012) , I have a requirement to add two new columns to a destination table which already has five years of data. How can i add these two new columns and bring data to the destination table which already has 5 years of data. Thanks |
Alert me Export table data to .MSG file using Stored Procedures or any plugin ? - Is it possible with a stored procedure to write/export/output the data as .msg outlook file using existing table data? |
SQL SEREVR QUERY - I HAVE A TABLE called TBLGENDER LIKE BELOW IN THIS TABLE 2 people getting 8000,2 people getting 5500,2 people getting 3500 AND 4 people getting 5000 ID NAME GENDER SALARY CITY 1 SHIVA MALE 8000 LONDON 2 MAMATHA FEMALE 6000 SYDNEY 3 NIHAL MALE 5000 DELHI 4 ROHAN MALE 3500 DELHI 5 PANDA FEMALE 3500 […] |
SQL Server 2016 - Development and T-SQL |
Using log4net in a dll which is called via CLR function - Hello I am refactoring older code which is part of an SQL Server CLR Function call. The code has a horrible local logger implemented, I would like to use a standard logger such as log4net. What are the pros and cons of such an approach? Is it feasible? Has anyone done something similar before? Best […] |
Issue with max() and aggregate, missunderstanding - Hi all, this is my first post here and I've been looking and trying to understand this for hours the various ways people have tried to get around this issue. My trouble is as follows. I have a database with three tables linked together by 'DocumentNo'. Two main linked tables which output all rows with […] |
Help with Query Results and Collation - I should know the answer to these questions, but I'm having trouble with a couple of my queries. First, my goal here is to compare data from a table in a source database with data from a table in another database to see whether there are any differences. Here's a simple example: DECLARE @TableA TABLE […] |
Administration - SQL Server 2014 |
SQL 2014 (or any other versions) Standard - ~Embedded Licensing~ - Anyone have any insights on how this licensing works and what the "Use Rights" are? I can't seem to find much about it. Most I gathered (and I could be wrong) is it is dedicated solely to the application that uses it. No other databases can be on it for any other reasons and no […] |
SQL 2012 - General |
MEMORY CONSUMPTION SQL 2012 - hi all, as you can see in attachment sql take 122 giga memory. and in report consmtion i see only 94 taken by sql . ( this report generated from sql) and idea where 30 giga is hidden :)? and how i can seem them ? thanks alot sharon |
SSIS adding new columns to existing table - Hello All, I am working in SSIS (Sql server version 2012) , I have a requirement to add two new columns to a destination table which already has five years of data. How can i add these two new columns and bring data to the destination table which already has 5 years of data. Thanks |
How can I convert %5B and %5D to [ and ] in a string - Hi, I have a string nvarchar(255) and I am try to convert the ASCII codes in it and also extract part of the string. Here is an example of a value: urn:ADL:CC_LB_SF_EN_D_C_%5BLB_LS_TCD%5D_%5BLB_LS_CotCF%5D_28_1 This is what I would like to convert it to: urn:ADL:CC_LB_SF_EN_D_C_[LB_LS_TCD]_[LB_LS_CotCF]_28_1 Then I would like to select what is between urn:ADL: and the […] |
SSRS 2014 |
Simple Cascade Parameters not updating - I have a parameter called SearchCriteria with four Available Values R, W, M, or A for Range of Dates, Last Week, Last Month, or Last Year respectively. I have another parameter to include a statistics Table at the End of the Report. For all but the Range of dates I want the stats table to […] |
SQLServerCentral.com Website Issues |
A while ago I stopped receiving my daily and weekly newsletters. - A while ago I stopped receiving my daily and weekly newsletters. I am not sure why. Today as a test I unchecked the selections, saved the unchecked values and rechecked the selections. I've done that before and it didn't help. Can you please let me know why I am no longer receiving these newsletters. It's […] |
| |
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. webmaster@sqlservercentral.com |