Forum Replies Created

Viewing 15 posts - 1 through 15 (of 54 total)

  • Reply To: Splitting out Full Name into Last, First, Middle Initial

    I'm following up on this. The query has been working great for many months now, it has only found a few outliers that have truly bad name formats in the...

    -Mark
    MSSQL 2019 Standard, Azure Hosted. Techie/Sysadmin by trade; Three years as a "DBA" now.

  • Reply To: Date vs Datetime recommendation

    @jeff Moden,

    I updated my queries and now there are no 1900 dates for where death date does not exist. I added a new bit of code to the ETL queries...

    -Mark
    MSSQL 2019 Standard, Azure Hosted. Techie/Sysadmin by trade; Three years as a "DBA" now.

  • Reply To: Date vs Datetime recommendation

    Thanks, Jeff and Scott.

    Jeff - I swear I had read somewhere else that the reason for the 1900 showing up on my exports was because of the DATE datatype. Your...

    • This reply was modified 3 years, 10 months ago by usererror.

    -Mark
    MSSQL 2019 Standard, Azure Hosted. Techie/Sysadmin by trade; Three years as a "DBA" now.

  • Reply To: Identity Insert Error

    THANK YOU! I wanted all rows of data from ALL columns in my "Import" table to be inserted into my "Destination" table, I had a duplicate column name due to...

    -Mark
    MSSQL 2019 Standard, Azure Hosted. Techie/Sysadmin by trade; Three years as a "DBA" now.

  • Reply To: Splitting out Full Name into Last, First, Middle Initial

    @ScottPletcher,

    Your query worked perfectly and simply adding "Insert Into MyTableName" above it did exactly what I needed it to do. Thank you.

    Now, I can build my SSIS package around the...

    -Mark
    MSSQL 2019 Standard, Azure Hosted. Techie/Sysadmin by trade; Three years as a "DBA" now.

  • Reply To: Importing a CSV into SQL Server Shouldn't Be This Hard

    Robin Wilson wrote:

    Another thing that is strange is that in SSMS 18 (17 was the same from memory) if you want to import Excel files you need to save the file...

    -Mark
    MSSQL 2019 Standard, Azure Hosted. Techie/Sysadmin by trade; Three years as a "DBA" now.

  • Reply To: Importing a CSV into SQL Server Shouldn't Be This Hard

    I really appreciated this article. It made me feel better about my skills (or lack of!). Reading the other comments about how others are import CSV files, which should be...

    -Mark
    MSSQL 2019 Standard, Azure Hosted. Techie/Sysadmin by trade; Three years as a "DBA" now.

  • Reply To: Count Group By and CASE

    Thanks for your help on this. I too realized my two CASE statements had to be exactly identical, and they were not.

    @jeff - I thought about the CTE method, but...

    -Mark
    MSSQL 2019 Standard, Azure Hosted. Techie/Sysadmin by trade; Three years as a "DBA" now.

  • Reply To: Count Group By and CASE

    Disregard. I found my error. 🙂

    • This reply was modified 5 years, 1 months ago by usererror.

    -Mark
    MSSQL 2019 Standard, Azure Hosted. Techie/Sysadmin by trade; Three years as a "DBA" now.

  • Reply To: Count Group By and CASE

    Thanks, Jeffery. Learned something new, again. I've applied this to my actual query and it works, as I had hoped now.

    -Mark
    MSSQL 2019 Standard, Azure Hosted. Techie/Sysadmin by trade; Three years as a "DBA" now.

  • Reply To: Custom Header Row in Query Result

    Jeffery,

    I had to slightly modify your PowerShell suggestion. The first line is as shown below and that 'works' (as in no error reported)

    $recordData = Invoke-SqlCmd -ServerInstance localhost...

    -Mark
    MSSQL 2019 Standard, Azure Hosted. Techie/Sysadmin by trade; Three years as a "DBA" now.

  • Reply To: Custom Header Row in Query Result

    I have a working solution after trialing several suggestions from here.

    First I tried the PowerShell ISE route by saving my query to a file with the concat method in it:

    -Mark
    MSSQL 2019 Standard, Azure Hosted. Techie/Sysadmin by trade; Three years as a "DBA" now.

  • Reply To: Custom Header Row in Query Result

    Jeffery,

    I don't know if the recipient of the data truly needs it sorted in order by the Row_ID field. I'll have to ask them or if it's nearly an identifier...

    -Mark
    MSSQL 2019 Standard, Azure Hosted. Techie/Sysadmin by trade; Three years as a "DBA" now.

  • Reply To: Custom Header Row in Query Result

    Kristen-173977 wrote:

    usererror wrote:

    I thought about doing a new Row 1 with just these items and then filling in the following columns with empty data and then a Union All, but...

    • This reply was modified 5 years, 3 months ago by usererror. Reason: Clarity

    -Mark
    MSSQL 2019 Standard, Azure Hosted. Techie/Sysadmin by trade; Three years as a "DBA" now.

  • Reply To: Custom Header Row in Query Result

    Jeff Moden wrote:

    usererror wrote:

    Currently, all the detail data is in one table that gets refreshed each month.

    Could you post the CREATE TABLE statement for that one table and also identify...

    • This reply was modified 5 years, 3 months ago by usererror. Reason: Clarity

    -Mark
    MSSQL 2019 Standard, Azure Hosted. Techie/Sysadmin by trade; Three years as a "DBA" now.

Viewing 15 posts - 1 through 15 (of 54 total)