Forum Replies Created

Viewing 15 posts - 4,696 through 4,710 (of 8,731 total)

  • RE: Are the posted questions getting worse?

    Alvin Ramard (7/16/2015)


    Phil Parkin (7/16/2015)


    .... up to and including the "F" word

    Foxbase?

    Foxpro?

    Foxboro? Ok, that's not a bad word, I just dislike the NFL team that plays there.

    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: Can anyone help get this to run?

    The error is telling you everything you need to know.

    Unclosed quotation mark after the character string '##OutputTable

    Look for an unusual large string literal and define where you should add 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: Nested query retrieving min and max values

    You could change your nested query like this:

    ( select TOP 1

    cast(f.valuestr as float) min_valuestr,

    f.valuetime

    from bvfindings f

    where f.ObjectName = 'Hematocrit'

    and f.sessionid = s.sessionid

    and f.ValueTime > s.open_time

    ORDER BY min_valuestr)

    However, 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: No of Months between two dates in YYYYMM format

    Jeff Moden (7/16/2015)


    I still want to know what someone considers to be a month. DATEDIFF(mm,'20150630','20150701') will say that a month has passed when only 1 day will have passed....

    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 to determine if a non-attendance is a “DROPOUT”

    Ok, so you want to change the whole streak and I only changed the month. This code will update the data correctly.

    WITH CTE AS(

    select * ,

    ...

    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 improve that query?

    Antares686 (7/16/2015)


    Recheck the logic, the Type cannot be both 4 and 3, which means 1,1,1 , 1,1,0 and 0,1,1 cannot occur. Which is why I bring it up to see...

    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: Delete records older than 90 days in SQL Server

    Basically, what Sean said.

    There's no option included in SSMS because most people won't delete rows older that a certain amount of time. There's also no standard on defining the date...

    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 to determine if a non-attendance is a “DROPOUT”

    I'll just copy your SQL Fiddle code in here to make it clear for anyone that might have the same issue or want to add a comment.

    CREATE TABLE [dbo].[SourceData](

    ...

    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: Drop a temporal table

    Is this where you write "Thanks for the question"? 😀

    Thanks for the question :hehe:

    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: New to SQL and Need Help

    To change this into a procedure, read the CREATE PROCEDURE entry from BOL (Books OnLine).

    To create the file, read about the bcp utility.

    You could also create the file by 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: How to improve that query?

    Chris Wooding (7/14/2015)


    Antares686 (7/13/2015)


    Kutang Pan (7/10/2015)


    Is there any other way to write the below query:

    SELECT

    SUM(CASE WHEN Type = 4 AND STATUS IN (1, 2, 3) THEN Value ELSE...

    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?

    Wow, now they're asking how to code the examples from BOL. :hehe:

    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: Converting T-SQL query to XML result

    That seems very similar to the example in BOL for Specifying XPath-like column names

    You could even google the query and you'd get the references. 😀

    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: User Notification Query

    I'm not sure about what you're doing and I can't test it right now because I don't have SSMS installed in here. However, I'm wondering if you only use 1's...

    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 Joins Basic example

    You actually would need to divide your query as you're trying to create a relation between rows that are not related.

    WITH AValues AS(

    select a.id,

    a.data,

    ROW_NUMBER() OVER(ORDER BY a.id) AS rn

    from 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

Viewing 15 posts - 4,696 through 4,710 (of 8,731 total)