Forum Replies Created

Viewing 15 posts - 226 through 240 (of 479 total)

  • RE: how to list out all days from last 6 month?

    Sergiy (2/10/2009)


    Derek Dongray (2/10/2009)


    The OP didn't mention that he had a calendar table and, in this case, I can't see that it's adding anything to the query.

    If you need to...

  • RE: Inserting records from multiple tables

    Ken McKelvey (2/10/2009)


    Derek – sorry for the confusion but my question was aimed at the OP as he seemed to be relying on the order the data was placed in...

  • RE: Order by

    Sergiy (2/9/2009)


    So, what was wrong with my solution?

    I thought your solution was just a step-by-step explanation of Adi's.

  • RE: Trigger Problem-Urgent

    Adi Cohn (2/9/2009)[hrI think that in a case that you drop a none computed column and replace it with a computed column, you can use an "instead of trigger" in...

  • RE: Guest Editorial: Do You Run Antivirus Software on Your SQL Servers?

    Servers I've managed have always gone with a variation of 3(b). That is, AV is installed but settings are adjusted to minimize impact, e.g. only scan on writes to the...

  • RE: how to list out all days from last 6 month?

    Sergiy (2/9/2009)


    SELECT C.[Date], COUNT(T.indate)

    from dbo.Calendar C

    LEFT JOIN dbo.YourTable T ON T.indate = C.[Date]

    WHERE C.[Date] > dateadd(m,-6,getdate()) -- probably you need to remove time portion here

    group by [Date]

    The OP didn't mention...

  • RE: TSQL

    james (2/9/2009)


    So it adds a temp table into memory or on the permamnent media or both? How long does the temp table last?

    There have been times when I want...

  • RE: Inserting records from multiple tables

    Ken McKelvey (2/9/2009)


    Do you realize that a table is an UNORDERED set?[/code]

    Yes, i do.

    After I posted (and was at home) it occurred to me that I needed to update my...

  • RE: how to list out all days from last 6 month?

    You probably need to provide more information as, from your current explanation, all you need seems to beselect indate,count(*)

    from xxx -- insert table name here

    where indate>dateadd(m,-6,getdate())

    group by indate

  • RE: Inserting records from multiple tables

    I have a solution (using cursors) which produces the required results, but I don't know how robust it is. I haven't come up with a set-based solution (yet).

    create table #a...

  • RE: TSQL

    Of course, if you want to be really silly you can docreate table # (_ int)

    go

    insert # select 1

    go

    select * from #

  • RE: multiple rows in detail table, connected w AND in WHERE clause?

    I don't know what your front-end is written in, but I wouldn't call either andrew's or my solution a complicated query.

    ' VBScript (or Visual Basic)

    SQL = "SELECT K.ID_Kandidat, Nachname, Vorname...

  • RE: Order by

    No. From Judy's description, Adi's solution is needed.

    Although I still don't know how he guessed that what what was needed from the sample data since my solution would produce the...

  • RE: how can i solve this problem?

    create table #t (

    AccountNbr int,

    Seq int,

    CreateDate varchar(20)

    )

    insert #t values (59961, 1, '01/05/09')

    insert #t values (59961, 2, '01/09/09......')

    insert #t values (59961, 3, '01/10/09')

    insert #t values (32187, 1, '01/05/09.......')

    insert #t values (32187,...

  • RE: Store Procedure

    You could try looking at @@NESTLEVEL is you know definitely that either A is called directly or B calls A. Of course, if a hypothetical procedure C also calls A...

Viewing 15 posts - 226 through 240 (of 479 total)