Forum Replies Created

Viewing 15 posts - 13,111 through 13,125 (of 14,953 total)

  • RE: Table Valued functions Vs Scalar Valued Functions

    Jeff Moden (6/28/2008)


    about 300-million rows

    That's kinda what I thought you were going to say.

    What I was suggesting is that the distance from Point A to Point B is exactly 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: Is T-Sql really that hard to learn?

    Grant Fritchey (6/30/2008)


    One thing not mentioned is the use of copy & paste. We have a project that's actually, honestly, a little complex. In one place, we found we needed...

    - 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 Multiple Instance Dilemna

    I generally use Windows domain security, and don't use mixed-mode. That means the sa account isn't active.

    When I have had to use mixed security, I've used different, extreme passwords...

    - 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: (Riga) WAITFOR DELAY. Can I keep querying until data is found?

    Try replacing your "print" commands with "raiserror", and use the "with nowait" option.

    raiserror('aaa', 10, 1) with nowait

    Print commands often wait till a buffer fills up before they send them 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: Delete rows without key

    You can delete with a join.

    delete Table1

    from dbo.Table1

    inner join dbo.Table2

    on Table1.a = Table2.a

    and Table1.b = Table2.b

    left outer join dbo.Table3

    on Table1.a = Table3.a

    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: tricky SQL

    You could do a join between the table and itself, something like:

    ;with

    CTE1 as

    (select client_id, t1.effective_date, t2.effective_date as end_date

    from dbo.temp_census t1

    inner join dbo.temp_census t2

    on t1.client_id = t2.client_id

    and t1.effective_date < t2.effective_date

    and

    (t1.event_description =...

    - 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: One function causes CPU 100

    I'm going to hazard a guess that the code is doing a lot of inserts and/or updates, because of the page splits. Beyond that, it's kind of hard 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: Find View and Procedure Information

    I don't know a way to find that automatically.

    You can add the table names to your Where clause, and narrow down the search. But so far as I know,...

    - 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: Difference between Numeric and Float

    Numeric (also called Decimal) has a defined precision and scale. Float just uses defaults for that.

    You can end up with overflow errors because of this.

    For example, if you define...

    - 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: MS Access frontend with SQL server Backend

    I used Access 2003 on an SQL 2000 database for 6 years for a small company. Worked great. Definitely go with the adp (project) option, rather than 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: How to use the try catch block in Function?

    You have to capture them in the calling procedure or code. Currently, there's no real error handling in T-SQL UDFs.

    - 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: Calculating a Percentage

    You need to cast/convert at least one of the numbers to either float or decimal (or money, I guess) before you do the division.

    Count returns an integer value. Math...

    - 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: Find View and Procedure Information

    Well, off the top of my head, you could do something like:

    select *

    from sys.all_objects

    inner join sys.sql_modules

    on all_objects.object_id = sql_modules.object_id

    where definition like '%nolock%' -- Put the hint(s) you're looking...

    - 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: Table Data Auditing

    http://www.sqlservercentral.com/articles/Auditing/63247/

    http://www.sqlservercentral.com/articles/Auditing/63248/

    These two articles and their discussions have a bunch of data on how to implement logging, pros and cons of different methods, etc.

    - 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: returning value from stored procedure

    Have you tried adding a select after the exec command?

    exec sp_Addnewsletter @IDSite, @name, @email, @Invalue output

    select @Invalue as Invalue

    - 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,111 through 13,125 (of 14,953 total)