Forum Replies Created

Viewing 15 posts - 751 through 765 (of 8,731 total)

  • RE: How do you store and retrieve useful scripts?

    grant@scarydba.com - Thursday, January 4, 2018 5:59 AM

    A combination of source control (flavor of the month is Git and GitHub) and the...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Is there a way to identify dynamic sql that may be vulnerable to sql injection?

    All those options are nice, but you still need to check for the front end code. Back when I started coding, we used to concatenate sql strings on the front...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: issue joining on Temp Table

    Well, you're referencing the temp table without joining to it first.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Skip rows when import a Flat File

    Vitor da Fonseca - Wednesday, January 3, 2018 8:25 AM

    Hi,

    I intend to import the data with an SSIS package, which would...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Is there a way to identify dynamic sql that may be vulnerable to sql injection?

    HappyGeek - Wednesday, January 3, 2018 7:34 AM

    juniorDBA13 - Wednesday, January 3, 2018 7:05 AM

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Creating multiple Rows from one row by substringing a column

    Here's a sample code to show you how to do it. It uses a cte that creates a tally table on the fly. You can convert the cte into a...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Skip rows when import a Flat File

    Vitor da Fonseca - Wednesday, January 3, 2018 5:58 AM

    Hi,
    I need to import two Flat Files, but I need to skip the...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Find a string with two dots

    HappyGeek - Wednesday, January 3, 2018 1:46 AM

    Excuse the formatting, it seems the interface likes it like this!!!! But as an...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Are the posted questions getting worse?

    drew.allen - Tuesday, January 2, 2018 11:48 AM

    A situation came...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Convert SQL results into single row of data

    Yes, there's a simpler way to do it which is faster, too. It's on the articles I showed you and I'm guessing it can be at least 3 times faster...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Convert SQL results into single row of data

    Check the following articles:
    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - SQLServerCentral
    Cross Tabs and Pivots, Part 2 - Dynamic Cross...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Find a string with two dots

    I wonder if the problem comes from something like this:

    WITH VTE AS(
    SELECT *
    FROM (VALUES('1'),('1.1'),('1.1.1')) V(S))
    SELECT CONVERT(decimal(2,1),S)
    FROM VTE
    WHERE...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Numerical conversion

    Jack Corbett - Friday, December 29, 2017 8:47 AM

    This is an even simpler option:

    WITH VTE AS
      (
       ...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Numerical conversion

    A shorter version:
    WITH VTE AS (
      SELECT *
      FROM (VALUES(3),(25.75),(12),(125.8),(1000),(1857.5)) V(I))
    SELECT I,
       RIGHT( 10000 + CAST(ROUND(I*10, 0) AS int), 4) AS LeadingZeros
    FROM...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Login less users in sql ?

    Apparently, you need some more help. Once you do the Google search, you need to open the links. Here are the first three that I got.
    https://blog.sqlauthority.com/2012/10/04/sql-server-importance-of-user-without-login-t-sql-demo-script/
    which...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2

Viewing 15 posts - 751 through 765 (of 8,731 total)