home.social

#sqlhelp — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #sqlhelp, aggregated by home.social.

  1. 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

  2. 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

  3. 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

  4. 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

  5. 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

  6. 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

  7. 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

  8. 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

  9. 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

  10. 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

  11. 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];

  12. 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];

  13. 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];

  14. 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];

  15. 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];

  16. 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

  17. 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

  18. 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

  19. 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

  20. 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

  21. #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

  22. #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

  23. #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

  24. #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

  25. #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

  26. 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: learn.microsoft.com/en-us/azur But I'm getting the enclosed error message during the certificate creation. What am I doing wrong? #sqlhelp

  27. 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: learn.microsoft.com/en-us/azur But I'm getting the enclosed error message during the certificate creation. What am I doing wrong? #sqlhelp

  28. 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: learn.microsoft.com/en-us/azur But I'm getting the enclosed error message during the certificate creation. What am I doing wrong? #sqlhelp

  29. I'm trying to import the Azure-trusted root certificate authority keys to to set up a SQL Managed Instance Link as described here: learn.microsoft.com/en-us/azur But I'm getting the enclosed error message during the certificate creation. What am I doing wrong?

  30. 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: learn.microsoft.com/en-us/azur But I'm getting the enclosed error message during the certificate creation. What am I doing wrong? #sqlhelp

  31. 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 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...

  32. 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 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...

  33. 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 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...

  34. 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 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...

  35. 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 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...

  36. Anyone know of any upcoming demos of Microsoft Fabric out in the data community?

    #SqlHelp

    cc @SQLAllFather

  37. Anyone know of any upcoming demos of Microsoft Fabric out in the data community?

    #SqlHelp

    cc @SQLAllFather

  38. Anyone know of any upcoming demos of Microsoft Fabric out in the data community?

    #SqlHelp

    cc @SQLAllFather

  39. Anyone know of any upcoming demos of Microsoft Fabric out in the data community?

    #SqlHelp

    cc @SQLAllFather

  40. Anyone know of any upcoming demos of Microsoft Fabric out in the data community?

    #SqlHelp

    cc @SQLAllFather

  41. #sqlhelp Is there a way to get Azure Data Studio to recognize SETVAR and SQLCMD variables?

  42. #sqlhelp Is there a way to get Azure Data Studio to recognize SETVAR and SQLCMD variables?

  43. Is there a way to get Azure Data Studio to recognize SETVAR and SQLCMD variables?

  44. #sqlhelp Is there a way to get Azure Data Studio to recognize SETVAR and SQLCMD variables?

  45. #sqlhelp Is there a way to get Azure Data Studio to recognize SETVAR and SQLCMD variables?

  46. 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

    #SQLHelp?

  47. 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

    #SQLHelp?

  48. 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

    #SQLHelp?

  49. 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

    #SQLHelp?

  50. 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

    #SQLHelp?