Forum Replies Created

Viewing 15 posts - 12,526 through 12,540 (of 14,953 total)

  • RE: Find contiguous dates w/o a cursor

    Here's one way to accomplish this:

    create table #DateOverlaps (

    ID int identity primary key,

    StartDate datetime,

    EndDate datetime,

    Val int)

    insert into #dateoverlaps (startdate, enddate, val)

    select '01/01/2008', '03/15/2008', 7 union all

    select '03/16/2008', '08/24/2008', 9 union...

  • RE: create a function to make columns into rows

    DBA (7/29/2008)


    thank you, what do you mean with a CTE, in my case i will use this function for a variable (int) , i don' think its necessary to create...

  • RE: Querying table variable in WHERE clause

    From what's posted, I can't tell why it would eliminate them. I've used that exact construct to manage duplicates in functions before, and it does work. It has...

  • RE: Querying table variable in WHERE clause

    Beyond the oddities of the Where clause with variables in it, you might also think about changing the Where Not In on the table variable to a Left Outer Join....

  • RE: Basic question on update statement

    Yes. So long as both updates are in the same statement, like your example.

  • RE: Bad Bad Bad Query

    usman.tanveer (7/29/2008)


    Actually the Inner Query (aliased as A) is not a subquery in my database, its a view, and users call this view with their where clause.... I just copied...

  • RE: Bad Bad Bad Query

    usman.tanveer (7/29/2008)


    Actually the Inner Query (aliased as A) is not a subquery in my database, its a view, and users call this view with their where clause.... I just copied...

  • RE: Super-long-running query?

    A trace would also show its run-time in hours pretty normally, so it might not even be something to worry about.

  • RE: Best method to refresh our QA database server?

    If you want to overwrite, then you can schedule a job that will back up the production database, copy it to the other server, and restore it there, with overwrite....

  • RE: Whats are the Advantages of Filegroups in Sql Server 2005

    If, for example, you place the filegroups on different disks, and then place tables on one and indexes on another, you can do parallel writes/reads, which can give you greater...

  • RE: Parent-Child Data

    Yes, this can be done relatively easily. Build a recursive CTE for the second table (Books Online has an article about it under "Common Table Expressions"), and you should...

  • RE: Can the foreign key and primary key be the same?

    Yeah, I do exactly that in what I call extended properties tables. PK and FK the same column.

  • RE: How to know a server have dual/quad core?

    SQL ORACLE (7/29/2008)


    So far only did SQLServerLifer give a right direction.

    Device Manager does not provide the number of core processors....

    I'm looking at the Device Manager on my computer right now...

  • RE: Memory leak in SQL 2005?

    An external DLL, like a CLR function/proc, might not show up as a separate process from SQL Server.

  • RE: SSMS Right-Click Modify selection issue?

    I've never seen it do that.

    I tried looking for an option that might do something like that. All I can say is play around with the scripting options a...

Viewing 15 posts - 12,526 through 12,540 (of 14,953 total)