#sqlhelp — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #sqlhelp, aggregated by home.social.
-
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'?
-
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'?
-
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'?
-
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'?
-
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'?
-
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.
-
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.
-
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.
-
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.
-
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.
-
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];
-
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];
-
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];
-
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];
-
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];
-
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 -
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 -
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 -
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 -
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 -
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
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
-
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
-
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
-
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
-
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
-
Tooting aloud but feel free to weigh in, my brain is fried, plus this is math(s), I think. Working with #TSQL #SQLHelp Fiddle at https://dbfiddle.uk/aesRm4jp
I have the values 0 to 360 degrees in a table, which corresponds to the cardinal directions. I want to round those to the nearest 15 so 8 to 22 are all "15"
I feel like there's a math function or two I could apply to make this work and modulus was initial reach but I'm not seeing it. Maybe I need to futz with case statements...
-
Tooting aloud but feel free to weigh in, my brain is fried, plus this is math(s), I think. Working with #TSQL #SQLHelp Fiddle at https://dbfiddle.uk/aesRm4jp
I have the values 0 to 360 degrees in a table, which corresponds to the cardinal directions. I want to round those to the nearest 15 so 8 to 22 are all "15"
I feel like there's a math function or two I could apply to make this work and modulus was initial reach but I'm not seeing it. Maybe I need to futz with case statements...
-
Tooting aloud but feel free to weigh in, my brain is fried, plus this is math(s), I think. Working with #TSQL #SQLHelp Fiddle at https://dbfiddle.uk/aesRm4jp
I have the values 0 to 360 degrees in a table, which corresponds to the cardinal directions. I want to round those to the nearest 15 so 8 to 22 are all "15"
I feel like there's a math function or two I could apply to make this work and modulus was initial reach but I'm not seeing it. Maybe I need to futz with case statements...
-
Tooting aloud but feel free to weigh in, my brain is fried, plus this is math(s), I think. Working with #TSQL #SQLHelp Fiddle at https://dbfiddle.uk/aesRm4jp
I have the values 0 to 360 degrees in a table, which corresponds to the cardinal directions. I want to round those to the nearest 15 so 8 to 22 are all "15"
I feel like there's a math function or two I could apply to make this work and modulus was initial reach but I'm not seeing it. Maybe I need to futz with case statements...
-
Tooting aloud but feel free to weigh in, my brain is fried, plus this is math(s), I think. Working with #TSQL #SQLHelp Fiddle at https://dbfiddle.uk/aesRm4jp
I have the values 0 to 360 degrees in a table, which corresponds to the cardinal directions. I want to round those to the nearest 15 so 8 to 22 are all "15"
I feel like there's a math function or two I could apply to make this work and modulus was initial reach but I'm not seeing it. Maybe I need to futz with case statements...
-
Anyone know of any upcoming demos of Microsoft Fabric out in the data community?
-
Anyone know of any upcoming demos of Microsoft Fabric out in the data community?
-
Anyone know of any upcoming demos of Microsoft Fabric out in the data community?
-
Anyone know of any upcoming demos of Microsoft Fabric out in the data community?
-
Anyone know of any upcoming demos of Microsoft Fabric out in the data community?
-
#sqlhelp Is there a way to get Azure Data Studio to recognize SETVAR and SQLCMD variables?
-
#sqlhelp Is there a way to get Azure Data Studio to recognize SETVAR and SQLCMD variables?
-
#sqlhelp Is there a way to get Azure Data Studio to recognize SETVAR and SQLCMD variables?
-
#sqlhelp Is there a way to get Azure Data Studio to recognize SETVAR and SQLCMD variables?
-
#sqlhelp Is there a way to get Azure Data Studio to recognize SETVAR and SQLCMD variables?
-
This is a _real_ dumb question but: anyone know how to kill SSMS via PowerShell? Neither of the following work because "Access is denied"
$Process.Kill()
$Process | Stop-Process -Force -
This is a _real_ dumb question but: anyone know how to kill SSMS via PowerShell? Neither of the following work because "Access is denied"
$Process.Kill()
$Process | Stop-Process -Force -
This is a _real_ dumb question but: anyone know how to kill SSMS via PowerShell? Neither of the following work because "Access is denied"
$Process.Kill()
$Process | Stop-Process -Force -
This is a _real_ dumb question but: anyone know how to kill SSMS via PowerShell? Neither of the following work because "Access is denied"
$Process.Kill()
$Process | Stop-Process -Force -
This is a _real_ dumb question but: anyone know how to kill SSMS via PowerShell? Neither of the following work because "Access is denied"
$Process.Kill()
$Process | Stop-Process -Force