Forum Replies Created

Viewing 15 posts - 3,721 through 3,735 (of 8,731 total)

  • RE: Are the posted questions getting worse?

    Brandie Tarvin (11/25/2015)


    So I did a "small" thing (that took more time than effort) for an internal customer this morning.

    About 5 minutes ago received an email with "THANK YOU" 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
  • RE: rows not retrieved with my query

    Sean Lange (11/25/2015)


    lnardozi 61862 (11/25/2015)


    In the script, you're selecting into a variable. No matter how many rows there are, the variable only gets set once.

    Not quite, the OP is using...

    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: Problems with CTE (recursive queries)

    I see the same thing as Sean, there's no hierarchy in what you posted. There's a parent/child relationship, but it won't go multiple levels.

    And please, next time post sample data...

    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 can I find the source of data for a DB

    I don't have much experience on any of those and don't have much spare time to play around and set something. Maybe someone else can give you something more specific.

    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: Filestream filegroups

    Rune Bivrin (11/25/2015)


    Where can I buy SQL Server 2015?:hehe:

    You don't need to buy it, is a free update that comes with Win10 Server Edition.

    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 can I find the source of data for a DB

    You could monitor sys.dm_exec_sessions or set a trace or extended events session.

    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 Unpivot

    You just need to add them to the derived table.

    DECLARE @SAMPLE TABLE (ID CHAR(4),Salary INT,Employee_Tax1 INT,Employee_Tax2 INT,Employer_Tax1 INT,Employer_Tax2 INT);

    INSERT INTO @SAMPLE(ID,Salary,Employee_Tax1,Employee_Tax2,Employer_Tax1,Employer_Tax2) VALUES ('A001',1000,120,95,125,105);

    SELECT

    X.ID

    ,X.[Desc]

    ,X.Earn_Ded

    ,X.Employer_Tax

    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: Today's Random Word!

    Alvin Ramard (11/24/2015)


    Spam

    Plenty

    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: Help: Calculated CASE Statement in Query

    jeff.joseph85 (11/24/2015)


    It's basically the same isn't it? For the most part? SQL code is recognized by Microsoft Access. Anyway, I'm just trying to sort this out. We...

    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: Help: Calculated CASE Statement in Query

    You have it "backwards".

    Try: CASE When TITLE.MilSrchPerfrmed is null then 0 else 1 end AS MSP

    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: Help with Query

    If you don't know, throwing queries at us won't work. We have no idea on how does your environment looks like. You mentioned that you're having an issue with your...

    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 with a CASE statement

    A shorter version with sample data:

    USE tempdb

    GO

    CREATE TABLE #Test( pieces int);

    WITH

    E(n) AS(

    SELECT n FROM (VALUES(0),(0),(0),(0),(0),(0),(0),(0),(0),(0))E(n)

    ),

    E2(n) AS(

    SELECT a.n FROM E a, E...

    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: Where clause prevents index seek

    That doesn't explain why would the query use the underscore in the WHERE clause.

    If this is an export for a migration and not a permanent process, I suggest that you...

    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: Help with Query

    SQL Server 2005 doesn't have IIF(), you need to replace it with a CASE.

    SQL Server uses DISTINCT instead of DISTINCTROW.

    Access and SQL Server syntax are not the same, so...

    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 in Converting SQL SERVER 2000 QUERY In 2008

    I believe this should be equivalent.

    SELECT sum ( isnull ( s.amt_du_ic, 0 ) ),

    d.pmt_dte,

    r.juris_id,

    c.acna,

    ...

    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 - 3,721 through 3,735 (of 8,731 total)