Forum Replies Created

Viewing 15 posts - 9,676 through 9,690 (of 14,953 total)

  • RE: print out (hard copy) automatically whenever an insert occurs on a specific table

    I guess it will probably depend on what output format you want. Are you simply printing a text file, or does it need to have some sort of formatting...

    - 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 solve fibonacci series in tsql

    Is what you're doing just a partitioned running total? That's what it looks like.

    - 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 some design advice

    Why not update all at once, and then do an insert of the rows that aren't in the target table. Two transactions. Should be pretty efficient, much more...

    - 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 trigger - history table schema

    I wrote a couple of articles on audit logging a while back. You might want to take a look at them, and (more importantly) at the discussions attached 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: Each item on a new line - comma delimited list function!

    You need to change a setting in Management Studio. In Tools, Options, Query Results, SQL Server, Results to Text, the default setting is 256 characters per column. Increase...

    - 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: Converting Temp Table to Table Variable... Is this possible and how?

    You go into every proc that has temp tables in it, and you rewrite it to use table variables. Change "create table #name" to "declare @name table", and search-and-replace...

    - 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: Each item on a new line - comma delimited list function!

    I tried this, after setting the query output to Text ("Results to Text" instead of "Results to Grid"):

    ALTER FUNCTION [dbo].[F_Table_Fields_Aliased](@Table varchar(200), @Prefix varchar(20))

    RETURNS VARCHAR(MAX) AS

    BEGIN

    DECLARE @Output VARCHAR(max)

    SET @OutPut = ''

    SELECT...

    - 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: Igor Nikiforov's String Functions

    If you view his member profile, it has a home page URL listed. However, it doesn't appear to be active.

    You might try the "send an e-mail" option from his...

    - 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: Stored procedure with optional parameter

    One thing you can do in a situation like this is, if the variable is null, assign it an impossible value.

    For example, if it's supposed to be an integer value...

    - 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 Stop audit trace files?

    What does fn_trace_getinfo tell you about the trace?

    - 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: print out (hard copy) automatically whenever an insert occurs on a specific table

    Instead of a trigger, I'd put a flag column in the table, "IsPrinted" or some such name, and default it to 0. Then set up a job that runs...

    - 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: Original Theatrical Release of Star Wars

    I camped out in a line that went around the block multiple times and saw the first showing on opening day.

    Saw it something like 30 times in the theatre 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: Invalid length parameter passed to the SUBSTRING function.

    Krasavita (4/29/2009)


    Can you write it I am confused.Thank you

    UPDATE

    dbo.TblCust

    SET

    LAST_NAME = CASE WHEN LAST_NAME LIKE '%,%'

    ...

    - 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: Restore Filegroup bnackups on another database

    That does sound like a better idea than separate filegroups in the 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: Are the posted questions getting worse?

    Bruce W Cassidy (4/29/2009)


    Roy Ernest (4/29/2009)


    I finished my article and it is on the way for publication... May 4th is the D-Day for me....

    [font="Verdana"]Well done, Roy! International Star Wars...

    - 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 - 9,676 through 9,690 (of 14,953 total)