Forum Replies Created

Viewing 15 posts - 24,211 through 24,225 (of 26,490 total)

  • RE: Find a change in address in a result set

    bcronce (9/23/2008)


    1,1,1234 park st,1-1-2000

    2,1,1234 park st,1-2-2000

    3,1,1234 park st,1-3-2000

    4,1,2345 park ave,1-4-2000

    5,1,1234 park st,1-5-2000

    6,1,1234 park st,1-6-2000

    The correct result should be 5.

    originally my set based logic would return the correct result for anything...

  • RE: query - dates

    ZenDada (9/23/2008)


    or using the year part,

    where datediff(year,startdate,dateadd(d,1,enddate))>=1

    or datediff(year,startdate, enddate)>=1

    depending on which one actually meets your definition

    This won't work if partial years span years. Example, datediff(yy,'2008-10-01','2009-01-31) = 1.

    😎

  • RE: Find a change in address in a result set

    bcronce (9/23/2008)


    When i tried to solve this based on just a table with (rownumber, addressident, vchaddress, datechanged), I ran into grouping problems. I could try to find the max rownumber...

  • RE: query - dates

    vyas (9/23/2008)


    select datediff(dd,sdate,edate)from table where datediff(dd,sdate,edate) =365

    where sdate is startdate and edate date enddate

    The above is not quite right. If you do the following:

    select datediff(dd,'2008-01-01','2008-12-31')

    the result is:

    365

    If...

  • RE: Select scores using join

    Instead of waiting for confirmation, here is the code I was working with:

    create table #TestTab (

    id int,

    totvisits int,

    score...

  • RE: Select scores using join

    garypete (9/22/2008)


    Thanks for the post, I had two objectives here from the large data collection.

    One was multiple visits (gt 2) and the other was to have a score above 4.

    I...

  • RE: Select scores using join

    Your logic eludes me. I can't figure out what you are asking for, let alone figure out how your logic provides you with the result set you get from...

  • RE: Can't get SSIS to output an int in excel file

    Two possibilities. One, no one else has run into this particular problem. Two, no one is using Excel 2007 yet.

    Give it some time, someone may actually have a...

  • RE: Foreign keys not recognizing in tables

    While running in debug mode, have you put a data viewer on the data flow into the lookup to see what data is there? If not, this would be...

  • RE: Log Space

    How often are you running the Transaction Log backups in your maintenance plan? Based on the size of the database and t-log, it doesn't look like your are running...

  • RE: File System Task

    No, the file connection will not create the directory if it does not exist. You do that in a File System Task using the create directory operation. This...

  • RE: Find a change in address in a result set

    Unfortunately, we can't really help you with just the info provided. Please take the time to read this article http://www.sqlservercentral.com/articles/Best+Practices/61537/.

    If you follow its advice, and post additional information regarding...

  • RE: Columns...

    Can't answer your question without seeing the query.

    😎

  • RE: help wit "IF" sub query

    John N (9/19/2008)


    trying to add and "IF at the end of a select query, can you help with the syntax

    example

    SELECT id1, id2, id3 FROM table

    IF x =...

  • RE: Using Joins and Derived tables

    You'd get better assistance if you follow the advice in the following article:

    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    😎

Viewing 15 posts - 24,211 through 24,225 (of 26,490 total)