Forum Replies Created

Viewing 15 posts - 13,546 through 13,560 (of 14,953 total)

  • RE: Query (duplicate rows)

    Try this, see if it does what you need:

    ;with LastEntry (N, D) as

    (select name, max(date)

    from dbo.entries

    group by name)

    Select E.Number, E.Name, E.Date, M.Text1

    From Entries As E

    Inner Join Main As M...

    - 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: Is there a way to query SQL statement of a view?

    In 2005, the text of the view is in sys.sql_modules in the definition column. In 2000, it's in syscomments (but might be split across multiple rows because of 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: Jobs or not or something different

    Have you thought of setting up a Try...Catch in the trigger so that it runs the unstable process and deals with it gracefully if it does fail? Would 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: Identity column

    You'll definitely get better performance from an Identity column than from something you create on your own.

    - 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: Software Comparison - Part 2

    majorbloodnock (6/3/2008)


    I must admit I'm scratching my head a bit here, regarding today's and yesterday's topics for discussion. The thing is that an analogy is there to illustrate a particular...

    - 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: Convert Single coulmn to a Single row

    You can use coalesce for this kind of thing, but it's not "a single SQL statement", since it takes a few lines of code.

    What Steve was suggesting, with "inner join"...

    - 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: Alternative to using "IN" or table data types?

    There are two ways I would suggest testing out. One is Grant's suggestion of two separate procs, called by a master proc. The other is a Union All...

    - 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: Enforce Referential Integrity across multiple tables

    I'm going to second Robert's suggestion. One master table with the IDs, then child tables with the ID and other stuff. Triggers can be used to enforce unique...

    - 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: Don't know the answer, can't form the question...and, besides, I'm a chicken (wearing a hat)

    As others have said, this is a great site for asking questions and getting articles.

    - 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: MSFTE

    You don't have to re-install. Use Control Pannel "Add/Remove Programs", click on "Change" on SQL Server 2005. You'll need to have your install disk in the drive when...

    - 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: Counting records over several tables

    select 'Table1' as TableName, count(*) as Qty -- First Table

    from dbo.Table1

    where RECORD_ModificationDate >= @StartDate_in

    and RECORD_ModificationDate < @EndDate_in

    union all

    select 'Table2' as TableName, count(*) -- Second Table

    from dbo.Table2

    where RECORD_ModificationDate >=...

    - 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: Naming Convention

    I tend to name views and procs based on the table(s) they will access, and the function they perform. My naming convention looks a lot like OOP, just without...

    - 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: Access/SQL Server ODBC Connection Issue: Error 17

    Check your connection properties in Access. I've seen that problem when there were incorrect credentials stored 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

  • RE: Index Creation

    Which fields you will create indexes on will depend on what your most common and/or most demanding queries will be.

    For example, if you usually have a vendor ID and want...

    - 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: Database Schema validation against a database

    I'm not really clear on what you're asking. Are you trying to find out how to validate some data before you insert it into 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

Viewing 15 posts - 13,546 through 13,560 (of 14,953 total)