Forum Replies Created

Viewing 15 posts - 4,141 through 4,155 (of 8,731 total)

  • RE: PHP to SQL

    That's possible with minor changes to the code that I posted. Based on your OP, it could look like this:

    CREATE TABLE dbo.tblReps(

    id int

    );

    INSERT INTO tblReps VALUES(1),(2),(3),(4),(5);

    DECLARE

    @startDate...

    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: Counting number of occurances

    Would you need something like this?

    CREATE TABLE dbo.TimeFrames(

    StartDate date,

    EndDate date

    );

    INSERT INTO dbo.TimeFrames

    VALUES

    ('4...

    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: how to convert the string date format to datetime using Derived column

    A simple CAST seems to work.

    (DT_DATE)"Sep 14 2015 10:14PM"

    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: PHP to SQL

    It would be easier if you tell us what you're doing. You could certainly execute a stored procedure for each row or you could tell us what are you trying...

    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: Choosing values

    Manic Star (9/23/2015)


    patricklambin (9/23/2015)


    Stewart "Arturius" Campbell (9/22/2015)


    Interesting question, thanks Steve

    Another of the functions copied from Excel.

    I don't think so. These functions have been introduced only to make easier the translation...

    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: SQL HELP Please how do we assign this text to a variable

    mw112009 (9/23/2015)


    Thanks

    Ahh.. but you still have to manually go and replace every single quote with a double single quote.

    I was thinking whether there was a way to get around that...

    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: CTE giving out inaccurate results

    You can't blame me if you use a different query than the one I posted. You keep joining the CTE to the table with no valid reason. You're basically assigning...

    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: Encryption of the SQL Server objects

    Duplicate post. All replies should go to the following thread: http://www.sqlservercentral.com/Forums/Topic1721931-2799-1.aspx

    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: CTE giving out inaccurate results

    Do you need something like this?

    WITH History_CTE

    AS

    (

    SELECT loanID,

    HistoryCounter,

    DENSE_RANK() OVER...

    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 characters before and after _

    You can use CHARINDEX and SUBSTRING to achieve this.

    Give it a try and post it. If you still have problems we can give you a hand.

    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: UDF to Sort Column Values into one Concatenated Key Field

    I was just trying to prove a point. My option is very similar to yours but with the simple way to speed things up as validation isn't needed because 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: UDF to Sort Column Values into one Concatenated Key Field

    It seems that you need to review the way you create the primary key.

    Here's an example on the failure and a possible workaround.

    You mentioned you're using long data types, 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
  • RE: need help to tune a query

    There are 2 issues here:

    Joins in general can generate duplicate rows which might affect the count. If you remove any join it could reduce the row count.

    Inner joins can reduce...

    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: Use of SQL database

    Check this thread for large implementations of SQL databases.

    http://www.sqlservercentral.com/Forums/Topic1076313-391-1.aspx

    You'll realize is not about size, it's about purpose.

    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: Using T-SQL Cursors to find first, highest and last values

    Ben,

    I agree completely with you in the sense that there's no way to define a first or last row without an ORDER BY. Rows in a table aren't organized in...

    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 - 4,141 through 4,155 (of 8,731 total)