|
|
|
|
|
|
|
Question of the Day |
Today's question (by Steve Jones - SSC Editor): | |
Modern Datatime Addition | |
What happens with this code?
DECLARE @MyDate DATE = '2015-08-27' , @MyTime TIME = '15:33:21.057'; SELECT MyDateTime1 = CAST(@MyDate AS DATETIME2) + CAST(@MyTime AS DATETIME2); | |
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) |
Creating External Tables When creating an external table in SQL Server 2017, I can specify a DATA_SOURCE parameter. What can I use as the value for this parameter? Answer: An external data source Explanation: The Data_Source parameter is designed to take the name of an external data source that you have already created. Ref: CREATE EXTERNAL TABLE - https://docs.microsoft.com/en-us/sql/t-sql/statements/create-external-table-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 |
veeam backup permission issue - Hi, From Veeam we are taking SQL Server backup. we are using ABC\abcadmin credentias to take the backup. We got a below warning. Warning: [TDB]Unable to update SQL backupset for instance : Code = 0x80040e09 Code meaning = IDispatch error #3081 Source = Microsoft OLE DB Provider for SQL Server Description = The UPDATE permission was denied […] |
SQL Server 2017 - Development |
Understanding schemas - I queried sys.tables, sys.all_views, sys.all_objects and . The following appear to be views: 1. tables 2. all_views 3. all_objects In all 3 of these cases what is the ‘sys’ part? Isn’t that a schema? I did a SELECT * on all_objects so I can view all objects. I have a few questions about the results of […] |
Problems with creating a foreign key column - Here is the code I am using: ALTER TABLE Costpoint.ProjectCodes ADD CONSTRAINT FK_ProjectCodes_Employee FOREIGN KEY (projectMgrID) REFERENCES Employee(employeeID); I am getting the following error: Msg 547, Level 16, State 0, Line 33 The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "FK_ProjectCodes_Employee". The conflict occurred in database "Amargosa Hotel", table "dbo.Employee", column 'employeeID'. I […] |
SQL Server 2016 - Administration |
Indexes are not replicated - I reconfigured the transactional replication on my database and i found indexes are not replicated to the subscriber in all the tables how to create the indexes on all the tables in subscriber with out effecting the replication |
SSISDB is in recovery - Hello, so my SQL agent job SSIS Server Maintenance Job has slowly been getting slower and slower over the past week, then today it ran over 8 plus hours when suddenly the SSISDB transaction log filled up max (not the drive Thank GOD) but now the SQL agent job failed and the SSISDB is "In […] |
Script to compare tables between two databases - Hi, I have same set of tables in Database A and Database B. If there any changes occurs to a table in Database A, then I have to make same changes in database B. Is there way to query and find the differences between tables in Database A & Database B? |
SQL Server 2016 - Development and T-SQL |
SSIS and flat file column headings with special characters in them - Thanks in advance for any help! I have a csv file that has a header row in which the header column titles have some special characters in them. For example, the column for a diagnosis code (we are a healthcare organization) might have the heading "Diagnosis: Primary". For reasons I won't get into here, I […] |
Group by and a list. - Suppose I want to do a count, grouped by an article and some columns I do not want to group on but I want some examples of the content. Is there a 'simple' solution for this. (Not using FOR XML) Example result. Counted Article Colors […] |
Macro in SSIS, pops up for user name password - Hi Guys, I am running a Macro file in SSIS VB script task. My macro pulls data from a https url and url requires user name and password. My package works fine in visual studio project solution but it pops up to enter user name and password. I need to schedule this package to run […] |
Administration - SQL Server 2014 |
Suspend-ClusterNode and Move-ClusterGroup - Hello everyone , In a SQL Server Fci cluster Does this Powershell command Permit to transfer resources to the second node of my cluster Suspend-ClusterNode xxxxx -Drain -Whatif or I must run the command too Move-ClusterGroup “GROUPNAME” –Node “xxxxx ” thanks |
Always on Quorum and Listener - I have three cluster nodes configured for Always on Availability group, two nodes are in same location(node1 primary and node2 secondary with synchronous mode) and the third node(node 3 another secondary replica in DR with Asynchronous) would be in DR location. Also, I have configured for automatic failover and trying to understand and ensure that […] |
SQL 2012 - General |
How to Query an Excel file with mutiple cells for one single ID - Hi Folks, My first question here. This may be lengthy, sorry in advance:-) I am looking to read an excel file into a SQL Server table. The issue I am having is the data entry in the excel file was done in such a way that a person can have multiple pieces of software listed […] |
BEGIN TRANSACTION, ROLLBACK TRANSACTION, COMMIT TRANSACTION - I do a lot of ad hoc update, insert, delete statements and was wondering if I should encapsulate using BEGIN... ROLLBACK... COMMIT to give me an out if something goes wrong like below: BEGIN TRANSACTION UPDATE B SET expired = -1 FROM GCDF_DB..BillingThirdNotice B INNER JOIN GCDF_DB..Certs C ON B.PeopleID = C.PeopleID WHERE C.certificationExpireDate < […] |
SQL Server 2008 - General |
SQL Server Agent Job - Decision Extract Question and Purpose - Hello Support Forum, I've inherited a 2008 R2 server and after scrubbing through the maintenance Plan and Job setup, I came across a scheduled event with the purpose of conducting a "Decision Extract" for an entire Database (that you specify). I've looked at the Query and can follow it no problem but I'm unaware of […] |
Reporting Services |
Creating bell curve in SSRS - Hi, I have a report that shows how long we have spent on certain matters (I work for a solicitors). I round the amount of time spent on a matter to the nearest hour so we could have 5 matters where we spent 1 hour, 3 matters where we spent 2 hours, 1 matter […] |
| |
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. webmaster@sqlservercentral.com |