Forum Replies Created

Viewing 15 posts - 5,056 through 5,070 (of 14,953 total)

  • RE: Deprecation consternation

    The worry about "with with" is reasonably easily resolved by a second find-and-replace.

    Here's what I'd do:

    1. Use the "generate scripts" option to generate a single script with drop and...

    - 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: To get the Max value from one column with case statement without using any aggregate functions

    nadabadan (2/8/2011)


    GSquared (2/7/2011)


    nzngh (2/6/2011)


    It was an Interview question, surly I couldn't answer it. I have tried it in any possible way that I know but I got only Null though...

    - 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: Multiple Inserts Using SCOPE_IDENTITY() from the first insert

    Edit: Double-post due to latency.

    - 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: Multiple Inserts Using SCOPE_IDENTITY() from the first insert

    Yes, that's how it works.

    - 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 Server Conection error

    It's probably lost its connection to the domain server. It usually takes a reboot to fix that, but a real network admin (which I am not) might have 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: newbie - how to correctly filter on date select * from dbo.tblSubmissions where createdby = CreatedOn > '2011-02-03'

    The convert version will bypass indexes on the datetime column, thus slowing the whole query down significantly. The range version can use indexes, and is thus usually much faster...

    - 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: Multiple Inserts Using SCOPE_IDENTITY() from the first insert

    Bing/Google/whatever "t-sql output". In SQL 2005, they added an "output" clause to insert/update/delete statements (works with merge as well, in SQL 2008).

    It will give you all the IDs and...

    - 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: Looking for a word occurence count in a rowset scenario.

    Here's a performance test I ran:

    SET NOCOUNT ON;

    IF OBJECT_ID(N'tempdb..#tmp') IS NOT NULL

    DROP TABLE #tmp ;

    IF OBJECT_ID(N'tempdb..#T1') IS NOT NULL

    DROP TABLE...

    - 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: Week Days generation

    Does the SSRS report pull data from a query that connects to a database?

    - 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: Looking for a word occurence count in a rowset scenario.

    Try this as well:

    IF OBJECT_ID(N'tempdb..#tmp') IS NULL

    BEGIN

    CREATE TABLE #tmp (

    ...

    - 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 with nested subqueries

    I'd have to see the underlying tables and some data from them to be sure, but this looks like a usual "pivot" attempt on a "one true lookup" table.

    There are...

    - 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: Week Days generation

    I use a calendar table for that. It's just a table of dates and the data about them.

    create table dbo.Calendar (

    CalendarDate datetime primary key,-- Date datatype in SQL 2008

    constraint...

    - 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: Where do you look for DBA's?

    Ferguson (2/8/2011)


    Jack Corbett (2/8/2011)


    Ferguson (2/8/2011)


    I am not saying I would not consider you, but I will try to answer your perhaps rhetorical question.

    Someone who as a young adult decides to...

    - 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: Where do you look for DBA's?

    Michael Valentine Jones (2/8/2011)


    I think some companies want a college degree just to make sure that you can read and write, since a high school diploma doesn’t seem to ensure...

    - 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: Retrieving column and table names used in a stored procedure

    The simplest way would be to look at the definition of the proc and go from there.

    - 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 - 5,056 through 5,070 (of 14,953 total)