Laden...
|
|
|
|
|
|
Question of the Day |
Today's question (by Steve Jones - SSC Editor): | |
Endpoint Authentication Order | |
If I want to specify that my database mirroring endpoint for an Availability Group uses Windows authentication first and then a certificate, how do I specify this in the CREATE ENDPOINT statement? | |
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) |
Adding Time I've got two columns in my table. One has a datetime value and the other has a time value. The data is something like this: empid shiftstart shiftlength 1 2022-01-02 08:00:00.000 08:00:00.0000000 1 2022-01-03 08:00:00.000 04:00:00.0000000 1 2022-01-04 08:00:00.000 06:00:00.0000000If I want to get the end time for shifts, which of these calculates this value: Answer: SELECT ws.shiftstart + CAST(ws.shiftlength AS DATETIME) AS shiftend FROM dbo.WorkShift AS ws; Explanation: You can CAST a TIME datatype to datetime and then add this to another datetime. This will add the time to the existing datetime value. Ref: CAST and CONVERT - https://docs.microsoft.com/en-us/sql/t-sql/functions/cast-and-convert-transact-sql?view=sql-server-ver15 Addition (+) - https://docs.microsoft.com/en-us/sql/t-sql/language-elements/add-transact-sql?view=sql-server-ver15 |
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 - Development |
default values on table - I'm rewritting some data warehouse load procs. The current process is filled with isnull(name,'n/a') on the select that is inserting. They are wrapping all the values in the insert with isulls and setting to 'n/a' if null. Is this faster than simply having a default value set to 'n/a' on the table that we are […] |
SQL Server 2016 - Administration |
Moving DB file - Can I attach DB in another server on different drive?? For Example Server: AAA , Database Name: DB_1 the MDF and LDF file is located on C drive Now I want this data file to copy on another Server: BBB on D drive and than attach the DB. How Can I do this?? It didn't […] |
Administration - SQL Server 2014 |
Named Instance SQL server - Hi, I have a SQL server that has two instances. However remotely it only recognises the first instance but without the name. For example Servername\instance1 and Servername\instance2 is on the server but it only recognises Servername. When I connect to that remotely I can see that it's the first instance only. Is there some setting […] |
Development - SQL Server 2014 |
SSRS Rendering format Excel Change ? - I was wondering if anyone knew how I can change the Excel rendering format in the reportserverconfig file so the default cell format is text and not General. If not, is there any way to format my fields in the stored procedure so when I download to Excel it formats as text? Thanks |
SQL 2012 - General |
Voice-Based Transport Enquiry System - Hello All, I am working on SQL project which is a Voice-Based Transport Enquiry System and I am looking the source code of this project. I have found one code from with the help of this post. Basically, This project is while traveling, you may have come across a long queue of commuters waiting for […] |
SQL Server 2019 - Administration |
Multiple instances to an OS using Always ON - This is for a sanity check to make sure I am correct in my thinking - Current Set up - Server farm 80GB memory on server 2 discs - C:OS E:Data - This is many drives with guaranteed specific performance threshold (I may not be saying that correctly) The discs on the SAN are setup […] |
Do you need a process server w/ Tabular AS when processing during the work day? - We have multidimensional cubes that need to be refreshed throughout the day. We have a process server that process the cubes and then we sync the cubes to a business user facing server. We do this because business users are not able to query the cube while it is processing. We plan to migrate our […] |
ownership chain - I am reading microsoft doc about owner chain, it says : quotes: --- USE AdventureWorks2016; GO CREATE USER [DP300User1] WITH PASSWORD = 'Pa55.w.rd'; GO CREATE ROLE [SalesReader]; GO ALTER ROLE [SalesReader] ADD MEMBER [DP300User1]; GO GRANT SELECT, EXECUTE ON SCHEMA::Sales TO [SalesReader]; GO CREATE OR ALTER PROCEDURE Sales.DemoProc AS SELECT P.Name, SUM(SOD.LineTotal) AS TotalSales, SOH.OrderDate […] |
how many ways i can encrypt data in my tables in sqlexpress 2016 and 2019 - I have used xml for clause , varchars and image cols q1) Please tell me how many ways i can encrypt data in tables in sql express 2016 and 2019 yours sincerely |
SQL Server 2019 - Development |
Help with query - Hello! I'm trying to query between 2 tables: one contains companies (each with a number of keywords separated by commas) and another table that contains the results of user searches in the database (each word that was searched and the number of searches for it ). As a result I want to get: a table […] |
General Cloud Computing Questions |
Anyone taking CS-8803-Systems Issues in Cloud Computing? - Curious if anyone it taking this class and how many hours you guys are spending per week and what you guys think about it. EDIT: I should share my experience. I am currently taking the course and spending maybe around 20~30 hours per week. The whole class is basically a group project as well. Have […] |
SSRS 2016 |
How to eliminate NULL data from columns in a tablix? - I have several columns in a row. I am not able to modify the query to eliminate NULL data. How do i eliminate data where only certain columns are NULL. If any of those columns I want to filter on have data, then I want the column to be show the data (even if some […] |
General |
Posted in the Wrong Forum - . |
Layouts using flexbox - I am learning flex-box right now , i just wanted to know how do you guys implement it and where it can be used? And if you guys know how to make layouts using flex-box that would be great. I know that grid is more popular than flexbox but still i would like to learn […] |
Security and Auditing |
GDPR and Backups - Although GDPR has been in place for some time, my organisation has had a dispensation to essentially ignore it up until now. The dispensation was because the contract from the government we were on was an interim basis while a new provider got their system online. The thinking was we'd be turning off our system […] |
| |
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. webmaster@sqlservercentral.com |
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Laden...
Laden...
© 2024