Forum Replies Created

Viewing 15 posts - 13,126 through 13,140 (of 14,953 total)

  • RE: Table Valued functions Vs Scalar Valued Functions

    Jeff Moden (6/26/2008)


    The other option was taking each line of the calculation, adding a column to a join table between the two sets, and calculating one column at a time...

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

    I bet you created a table with columns like "Question1", "Answer1", "Question2", "Answer2". Something like:

    create table Exams (

    ExamID int identity primary key,

    Question1 varchar(100),

    Answer1 int,

    Question2 varchar(100),

    Answer2 int,

    ... and so 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: Inserting row with Procedure

    OpenQuery is what I was going to suggest as well, if you need this to be dynamic.

    - 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: Frequent calls to sp_send_dbmail result in only few actually sent emails

    What I'd do next is fire the thing up and run it like 10-thousand times from 10 connections, and log it. Find out what's in common between the ones...

    - 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: dropping tables where rowcount is zero

    You might also want to make sure there aren't any tables that are referenced by operational code, but which don't have rows at the moment.

    For example, I've seen code 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: SP

    The Case statements in the SQL string aren't written correctly.

    Change "CASE p.ID_Pessoa" to just "CASE". If you have a variable or column name after Case, you can't do complex...

    - 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 or Replication best for refresh from Production to Development

    Yes. Save the script, restore the production database to the dev environment, run the script on it. Up-to-date data, and if the script fails to run correctly, then...

    - 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 results of employee table even if

    The problem is the Where clause:

    "WHERE (dbo.[Prevention Response].Date > CONVERT(DATETIME, '2007-12-31 00:00:00', 102))"

    If an employee doesn't have any entries in Prevention Response, the Date column will...

    - 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: Inserting row with Procedure

    The best way is to check the procedure. That way, you can also check what data types each column is, 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: SSIS package or Replication best for refresh from Production to Development

    I don't think replication will work if you start making changes to the target database. I could be wrong about that, but I'm pretty sure it doesn't really allow...

    - 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: Comparing/contrasting twodatabases

    I'd use ApexSQL Diff for this. I haven't tried the RedGate product, but I'm sure it would do it just as well. (I have a lifetime free-upgrades license...

    - 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 Data without Dynamic SQL

    It sounds like someone came up with the brillant* idea of storing meta-data for other tables in a "master table".

    If you're stuck with that database, you're probably stuck with dynamic...

    - 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 Valued functions Vs Scalar Valued Functions

    I currently use 2 table-valued functions. With those, it's high-performance, many-reuse code, and neither of them uses any table variables. (Inline select functions) That means they 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: TEMPDB adding files

    There are a number of ways to do this. The one I find easiest is to go to tempdb in Management Studio (under System Databases), right click and go...

    - 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: T-SQL BOOK

    I recommend "SQL Server 2005 Bible" by Paul Nielsen. His SQL 2000 Bible is what got me started as a DBA, and it made the whole thing a LOT...

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