Forum Replies Created

Viewing 15 posts - 2,026 through 2,040 (of 8,731 total)

  • RE: Help with script

    dandrews 45259 (10/20/2016)


    [ img]C:\Users\dandrews\Desktop[/img]

    The picture won't show up. And even if it showed up, it's not what it's needed.

    Please, read the articles in my signature to know what we...

  • RE: Parameter on Powershell Script

    mister.magoo (10/20/2016)


    I was wondering whether all this complexity is worth it...just to run a dtsx? But I'm not a DBA, so I assume this is a small part of a...

  • RE: Parameter on Powershell Script

    Oh Magoo, you've done it again! 😀

    That worked perfectly. Now I wonder what would they prefer, if the Powershell option or the bat file option.

    Here's the ps1 final script .

    param($dtsx...

  • RE: Computed column storage size

    Persisted computed columns only make sense when the computation is expensive or when an index is needed. If that's not the case, persisting the computed column makes little sense.

  • RE: Computed column storage size

    Exactly what DesNorton mentioned. I just wanted to add something about the performance.

    The FORMAT function has been proven to be very slow. It's up to 40 times slower that previous...

  • RE: Parameter on Powershell Script

    Brandie Tarvin (10/19/2016)


    Have you tried renaming the folders to use underlines instead of hyphens?

    I think the hyphens are the problem. That powershell might see them literally as a switch "notifier"...

  • RE: Pivoting data

    The article that I posted does exactly what you're asking, put the columns as rows. There's no magic way to do it without coding. Here's an example that might have...

  • RE: Are the posted questions getting worse?

    Can anyone help in a Powershell issue I'm having?

    If I can't find a solution, I'll have to convince my lead to use bat files.

  • RE: Urgent please help--Append Date(yyyymmdd format) to filename (Example: tnvin_20161019.txt)

    Add this to your stored procedure and keep a single call to the database instead of 3.

    DECLARE @Bcp NVARCHAR(200);

    SET @Bcp = N'bcp [St].[dbo].[TmpTNVINTRInfo] out "C:\tnvintrailer\tnvin_' + CONVERT(NCHAR(8), GETDATE(), 112 )...

  • RE: Order SQL data by country

    What happens when you get a row from Spain? or Portugal? or any other country in Europe?

    You need to create a Countries table to store that information and, preferably, a...

  • RE: Today's Random Word!

    Manic Star (10/18/2016)


    djj (10/18/2016)


    Ed Wagner (10/18/2016)


    whereisSQL? (10/18/2016)


    Revenant (10/18/2016)


    crookj (10/18/2016)


    djj (10/18/2016)


    Grumpy DBA (10/18/2016)


    BWFC (10/18/2016)


    Current

    Currant

    Food

    Hungry

    Hungary

    Europe

    Brexit

    Vote

    Drink

    Martini

  • RE: Help with basic query

    I totally agree with Sean. The column should be a varchar as it's just a number to identify the employee. It could be an integer if it's an integer somewhere...

  • RE: tsql or something to get if file exists and date of file

    Something like this?

    CREATE TABLE #tmp( output nvarchar(max));

    INSERT INTO #tmp

    --Change Path

    EXEC xp_cmdshell 'dir C:\Users\lcazares\Documents\Statement.pdf /TC'; --Uses /TC for creation date

    SELECT CAST( LEFT( output, 10) AS datetime)

    FROM #tmp

    WHERE output LIKE '[0-9][0-9]/[0-9][0-9]/[0-9][0-9][0-9][0-9]%';

    DROP TABLE...

  • RE: How to find repetitive strings in a column and then remove the second string

    Here's another option. It considers that the address can be identified by the first 8 characters. You can adjust that value.

    SELECT *, LEFT( a.address, CHARINDEX( LEFT( a.address, 8), a.address, 2)...

Viewing 15 posts - 2,026 through 2,040 (of 8,731 total)