Forum Replies Created

Viewing 15 posts - 4,666 through 4,680 (of 8,731 total)

  • RE: table size difference in two DB

    Different fill factor? Difference on index fragmentation?

    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: cross join query

    Jayanth_Kurup (7/20/2015)


    select * from #t1 t1

    cross join #t2 t2

    where t1.city <> t2.city

    and t1.city > t2.city

    Do you realize that the first condition is not needed?

    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: Date question

    You need to add quotes to your date (and if possible remove the dashes).

    Date >= '20150720'

    The reason for returning older dates is that without quotes, SQL Server identifies the value...

    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: cross join query

    Try the following article.

    http://www.sqlservercentral.com/articles/sql+n-Tuples/89809/

    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: The Big Bit

    There's just one exception to the rule: The string FALSE will return 0 when converted to bit.

    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: case when / case when ...division by 0 error..help!!

    There are 2 possible options:

    Instead of using COUNT, use SUM which can return 0.

    ,SUBSTRING((SUM(DISTINCT CASE WHEN d.attribute_value IN ('iPhone','Android') THEN 1 ELSE 0 END)

    /SUM(DISTINCT CASE WHEN b.activity_name ='Open Email'...

    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: Importing Excel Data into SQL Server Express 2008 R2

    After reading again your original post, I guess that the problem is effectively with [data$], that should be either a named table in Excel or the name of a spreadsheet...

    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: Importing Excel Data into SQL Server Express 2008 R2

    The client is the computer with the user interface (most commonly Management Studio). In this case, the client and the server are the same computer.

    SQL Server uses service accounts to...

    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: Importing Excel Data into SQL Server Express 2008 R2

    Is the file in the server? The path refers to the server, not the client.

    Does the Service account have permissions to the file? Remember that it's not your account, but...

    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: Numeric/Negative Check

    And this is the problem with cross posting. We don't know if you're using 2005 or 2012 as you posted basically the same question on both forums and got similar...

    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: Trying to print records that have only english characters

    This is a different way of accomplish this task, but you might need to correct the sample data to be able to check it.

    --Note the N before the string literals...

    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: Trying to print records that have only english characters

    You need a double negative condition. The only problem is that you need to include all possible characters as I did with the space.

    SELECT *

    FROM Test

    WHERE Name NOT...

    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: View - Add 2nd priority (top value) per PK to existing view that chooses top Priority value

    You might want to read more about the OVER clause.

    Have a nice weekend 😉

    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: View - Add 2nd priority (top value) per PK to existing view that chooses top Priority value

    I'm not sure if I understood correctly, but this should give you an idea.

    CREATE VIEW [dbo].[vSHLBHL_BHLPriority]

    AS

    WITH vSHLBHL_BHLrows AS(

    SELECT ID_Wells,

    ...

    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: autogrowth setting

    I agree that it depends. Some people might even suggest to disable autogrowth and set the database to the max possible size. To define the max possible size, you need...

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