Forum Replies Created

Viewing 15 posts - 8,266 through 8,280 (of 14,953 total)

  • RE: CTE's are useless

    dipti9patel (10/1/2009)


    Can anyone tell me CTE uses temp db or memory to hold the data for next statement?

    Yes, they do.

    They're just like table variables and temp tables and derived tables....

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: CTE's are useless

    kramaswamy (9/25/2009)


    just incidentally while we're on this topic, is there any actual difference between the following two statements?

    with cte as

    (

    select * from table1

    )

    select * from cte

    where field1 = value1

    and

    select *...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: CTE's, Do you use them on an everyday basis?

    Can't say that I use them every single day, but I do use them quite frequently.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Bit by the SQL Autogrow bug

    Shrinking the file by small increments is usually the best way to handle the immediate problem.

    I have a monitoring script that checks how much space a database has in it,...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: In Praise of Barebones Applications

    I'm firmly in the "incremental improvements" camp. Build something that does something useful for the users. Then add to it incrementally and constantly review for potential improvements. ...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Effective Dating Series Part I - The Problem

    ddunn-1115368 (10/1/2009)


    Great aticle! I've been trying to get this concept across to the developers of an accounting package that I work with. Managing changes in price lists (never...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: question on primary key (unique clustered index)

    A heap table is simply a table without a clustered index. May or may not have a primary key defined, the lack of a clustered index is the defining...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: does ident_current() work for uniqueidentifer also

    If you're inserting from a dataset, you can also join to a temp table that has a column with a newid default constraint, and get all of them at the...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Do nothing in a sql statement--help

    Jeff Moden (9/30/2009)


    Mark-459099 (9/25/2009)


    How do you write a "do nothing" in sql. I have a statement where if two variables are 0, I don't want anything to execute

    for example

    if...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Effective Dating Series Part I - The Problem

    When I've done this before, I've kept the dates in the promotions table. I called it a "PricingScheme" table, since it included other things that just special promotions, but...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: question on primary key (unique clustered index)

    You can create a table with a clustered index but no primary key. You can create a table with a primary key but no clustered index. You can...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: New Code formatting engine rolled out

    I like that my tab indents don't go all wonky with the SQL one. Hadn't tried that option before, but noticed it on the bar and tried it a...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: does ident_current() work for uniqueidentifer also

    Garadin (9/30/2009)


    GSquared (9/30/2009)


    It would be trivially easy to do that in SQL 2005, with the Output clause that added.

    For SQL 2000 (which is the forum you posted in, so I...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Insert Word Document

    Check out OpenRowset, the options for Bulk and Single_BLOB. That should allow you to import a file into a binary field.

    I'd be more inclined to store the Word file...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: does ident_current() work for uniqueidentifer also

    It would be trivially easy to do that in SQL 2005, with the Output clause that added.

    For SQL 2000 (which is the forum you posted in, so I assume it's...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

Viewing 15 posts - 8,266 through 8,280 (of 14,953 total)