TSQL Problem:
Let's say you've got one or more scalar values that are VARCHAR 'strings' and you want to determine if they can be typed more appropriately.

For example '16:16:34.6733333' is data type TIME. It's easy to examine the value manually to make that determination. But how would you do it programatically (via TSQL)?

I've tried casting the VARCHAR as different types. TRY_CAST is successful for some data types. How would I know which one is 'right'?

#SQLHelp
#SQLServer
#SQL
#TSQL

Aha, root issue was not what I thought it was.

By virtue of them having mapped the login to SSRSAdmin, it was listed as the owner in the database properties. I changed that to sa and then was able to create the user proper in the database.

#sqlhelp

If anyone watches #SQLHelp, I have a database where someone created a SQL User but named them dbo

e.g.

CREATE USER [dbo] FOR LOGIN [SSRSAdmin];

What they should have done is specify the user is the same as the login but doubled it up in the SSMS UI because they were monkeys with lit dynamite.

My challenge is how do I unbugger this?

Following didn't work

ALTER USER [dbo] WITH NAME=[SSRSAdmin];

DROP USER [dbo];

#sqlhelp anybody using SDK Database Projects in VSCode w/extension? Trying to get the new preview Schema Compare to save changes to my project and it keeps failing, it says the folder already exists. Is ADS the only way to update the project currently? My GitHub action reBUILDs the dacpac to properly exclude things, so I need the project updated,not just the DACPAC. ADS does it,but I feel like I’ll need to get everyone to use ADS, then rug-pull them and say “psych, ADS is gone, use VS Code now.”

Is there any information specifically on the impact of enabling wait stats capture in query store? I'm in a hyper-cautious company and am being asked about this.

Erin Stellato has never mentioned anything about it, and I don't recall it being me tioned in Tracy and Grant's book on query store.

#sqlhelp
#sqlfamily
#sqlserver

Trying to build my first Data Vault model in #Snowflake. But I'm not quite understanding the concept of hash keys. My source system already has a sequence as a surrogate key and just creating a hash of that value seems to serve no purpose.

I can understand it if I didn't always have a surrogate key but why should I use them if I do?
#sqlhelp #datawarehouse #datavault #datadesign

OK
Someone around having some Infos regarding SSRS 2019 ( Dev or Ent ed) and mobile reports? See
https://learn.microsoft.com/en-us/sql/reporting-services/reporting-services-features-supported-by-the-editions-of-sql-server-2016?view=sql-server-ver15
Should be supported for above mentioned editions
But when setting ssrs up, there is no menu for mobile reports.
Compared with 2017 ssrs dev. There it is.
But not in 2019. See screenshot
Any ideas/hints ?

#sqlhelp
#sqlserver #ssrs

SQL Server Reporting Services features supported by editions - SQL Server Reporting Services (SSRS)

Learn about SQL Server Reporting Services (SSRS) features supported by the different editions of SQL Server.

#SQLServer Permission question: Can I grant a user the ability to alter existing objects but not create new?

It doesn't look like based on what my tests are indicating.

#sqlHelp

I've got what might be a dumb question. #SQLHelp

Can a SQL stored procedure insert data into tables AND return a result set for a report? Would that be bad design/practice to set it up that way?

Context: it's a payroll process that has to update a set of custom tables with paycheck-specific data and then return that + other data back to generate the pay advice slips or checks. Both things are done at the time of printing these advice slips/checks.

My gut says create 2 procs, one for each purpose but looking for input/advice.

I'm trying to import the Azure-trusted root certificate authority keys to #sqlserver to set up a SQL Managed Instance Link as described here: https://learn.microsoft.com/en-us/azure/azure-sql/managed-instance/managed-instance-link-configure-how-to-scripts?view=azuresql&tabs=sql-server#import-azure-trusted-root-certificate-authority-keys-to-sql-server But I'm getting the enclosed error message during the certificate creation. What am I doing wrong? #sqlhelp
Configure link with scripts - Azure SQL Managed Instance

Learn how to configure a link between SQL Server and Azure SQL Managed Instance with Transact-SQL (T-SQL) and Azure PowerShell or Azure CLI scripts.