Forum Replies Created

Viewing 15 posts - 4,936 through 4,950 (of 14,953 total)

  • RE: IS NULL Parameter

    You should be able to do that pretty easily in the underlying query, just by using IsNull or Coalesce.

    - 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: First and Last in group function

    First = Top 1

    Last = Top 1 with inverted Order By

    For example:

    select

    (select top 1 MyColumn

    from MyTable

    Order By MyColumn) as First,

    ...

    - 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 what circumstances are there no other option than to use cursors?

    TheSQLGuru (2/17/2011)


    There are numerous places where cursors are acceptable if not preferred, IMNSHO. What we REALLY need is faster-performing cursors from the Microsoft engine team!!

    Use CLR procs/functions for those....

    - 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: SSIS Package - Data Flow Task

    Are there any transformations at all on that column? Derived column or anything else?

    - 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: Hierarchy Product struture in relational database

    Have you considered using a Nested Sets style hierarchy? They are much, much faster to query, and usually work better in SSAS that way.

    Data on hierarchies at: http://www.sqlservercentral.com/articles/T-SQL/65540/

    Data on...

    - 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: The Oracle SSIS Question

    I searched for "oledb 64-bit sql" online, and found a bunch of articles that seem to suggest you need the Oracle 10G client and that you need to include 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: query an xml file !?

    Try this:

    declare @xmlFile xml

    set @xmlFile = '<?xml version="1.0"?>

    <FamilyAndSubFamily>

    <myStruct parentStructId="0" family="18" subFamily="11" />

    <myStruct parentStructId="0" family="43" subFamily="32" />

    <myStruct parentStructId="0" family="7" subFamily="0" />

    </FamilyAndSubFamily>

    ';

    --

    SELECT

    x.i.query('.').value('(myStruct/@parentStructId)[1]','int') AS ParentStructID,

    x.i.query('.').value('(myStruct/@family)[1]','int') AS Family,

    x.i.query('.').value('(myStruct/@subFamily)[1]','int') AS SubFamily

    FROM @xmlFile.nodes('/FamilyAndSubFamily/myStruct') as x(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: Mechanism of Linked Server

    More likely, it's an issue with distributed transactions. Those can be very, very slow.

    I'd have to see the query to give advice on it, but take a look at...

    - 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: Are the posted questions getting worse?

    Jeff Moden (2/17/2011)


    The Dixie Flatline (2/17/2011)


    ...My mind was in the gutter too.

    Heh... the list is growing by leaps and bounds. Lot's of folks sent me the same request via...

    - 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: Membership Database schema incl. 12 monthly renewals

    Uripedes Pants (2/11/2011)


    my 2 cents.... Jack's idea of parent/child user/payment is the way I'd go. This will retain payment history which someone is sure to ask for. however,...

    - 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: Sync with backup option on distribution DB ?

    Yes, do that.

    - 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: Sync with backup option on distribution DB ?

    Yes, do that.

    - 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: Sync with backup option on distribution DB ?

    I'm not clear on what you're asking.

    Are you planning on replicating, and backing up the target database in order to use that for DR? If so, can you clarify...

    - 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: SQL Profiler kills performance

    Just to expand on what Grant wrote:

    SQL table storage requires writing to the transaction log, checking locks, resolving locks, writing to the table, marking the tran log as committed, et...

    - 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 a select clause, include a column if it exists, or just return null if not

    You'd have to use dynamic SQL for that.

    Build the query string using sys.columns, then execute it using sp_executesql.

    - 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 - 4,936 through 4,950 (of 14,953 total)