Forum Replies Created

Viewing 15 posts - 1,681 through 1,695 (of 2,643 total)

  • RE: Looking Up List of Partial Strings

    carminamae.gonzales - Wednesday, February 27, 2019 6:33 AM

    The first 2 characters is always unique in my data set...

    If you have a number...

  • RE: Compare Lists

    Another way of getting the results:
    SELECT x.PackageID, d.ServerName MissingServer
      FROM @DeploymentServers d
     CROSS APPLY(SELECT DISTINCT p.PackageID
                   FROM @PackageServers p
     ...

  • RE: How to use STUFF and FOR XML PATH to get a list of column names IN ORDER BY COLUMN_ID

    Or something even simpler like this should work:
    DECLARE @Cols NVARCHAR(MAX)=''
    SELECT @Cols +=QUOTENAME(c.column_name)+', '
      FROM INFORMATION_SCHEMA.columns c
     WHERE c.TABLE_NAME='MYTABLENAME'
       AND c.TABLE_SCHEMA='dbo'
     ORDER BY c.ORDINAL_POSITION

  • RE: Expand multi-join with another table

    Super_Grover - Monday, February 25, 2019 12:19 PM

    Thank you very much Jonathan!
     I added the line and fieldname and no error whatsoever. So...

  • RE: Totals up to a specific date

    drew.allen - Monday, February 25, 2019 10:37 AM

    Luis Cazares - Monday, February 25, 2019 8:35 AM

    February 25, 2019 at 10:41 am

    #2022866

  • RE: Slow running Stored Procedure when using Date Parameters

    What indexes have you got on dbo.MyTable? I think different index usage between the queries is the problem as you are stopping parameter sniffing by setting the dates within the...

  • RE: Totals up to a specific date

    lukaszpiech - Monday, February 25, 2019 7:05 AM

    Thank you very much for a response.
    Unfortunatelly, i can't alter or add any functions on...

  • RE: Totals up to a specific date

    I don't think your query will do what you want. It's selecting the same results in the recursive part of the query that its selecting in the anchor part.
    It...

  • RE: SSIS packages slow BCP processing

    Could you just create a staging table on your data warehouse with the same structure as the table on the other server. Import the rows you need into the staging...

  • RE: Encrypting All Procedures in a Database

    The only way I know is to script all the stored procedures and add the line "with encryption"
    I'd create a script for each stored procedure like this:
    [code...

  • RE: Memory consumption is > 90%

    Michael L John - Friday, February 22, 2019 2:03 PM

    Feivel - Friday, February 22, 2019 1:49 PM

  • RE: Update Query

    You should put the birthdays with their id in a table. Then your query will work.
    Also, you don't need the last two lines at the end of your query:

  • RE: Memory consumption is > 90%

    Feivel - Friday, February 22, 2019 12:28 PM

    Okay so the next step is if we know that sql server is the culprit...

  • RE: Expand multi-join with another table

    You just need to add the table in a CROSS APPLY or OUTER APPLY and select TOP(1) with an ORDER BY date DESC
    ...
    From Beaufort.dbo.DPIB010 t1
    CROSS...

  • RE: Max date

    frederico is right, you should change the table definition to store date type values. But you can order that string in date order
    SELECT TOP(1) *
      FROM...

Viewing 15 posts - 1,681 through 1,695 (of 2,643 total)