Forum Replies Created

Viewing 15 posts - 9,481 through 9,495 (of 14,953 total)

  • RE: joke

    Uhg! (To both of you.)

    (Good ones. Made me groan in humor.)

  • RE: confused by user defined functions

    Not sure about why the error message. Get rid of the semicolons, the function will still run, it's just less "clean".

    I also noticed that one of your input parameters...

  • RE: Should one follow directives from above

    If you want to bring this up without bypassing channels, there are a couple of ways to do that.

    Probably the best option in most circumstances, is to call a meeting,...

  • RE: query of information

    Try this:

    select distinct srs_esd.*

    from srs_esd

    left outer join srs_cap

    on srs_esd.esd_code = srs_cap.cap_stuc

    where srs_cap is null;

  • RE: confused by user defined functions

    Try this:

    create function dbo.Maxof

    (@status text,

    @actuals money,

    @committed money)

    returns money

    as

    begin

    declare @Output money;

    if (@status='Closed') or (@actuals > @committed)

    select @Output = @actuals;

    else

    select @Output = @committed;

    return @Output;

    end;

    There's no "End If" statement...

  • RE: Data Model Advice Needed

    That sounds like a good way to do this. You could probably make the Date and LocationID columns into a composite primary key for the table.

  • RE: T-sql procedure error in job

    If you could post the full definition of the proc, and the source tables, I bet I can not only fix this, but eliminate the cursor and make it much...

  • RE: Giving Your Best

    Again, you're nearly echoing certain chapters of Problems of Work.

    A thought I heard once expressed it well to me, "You have to aim for the stars if you want to...

  • RE: TRACKING AND RECORDING DATABASE GROWTH

    I have a job that does this:

    set nocount on;

    declare @sql nvarchar(max);

    select @sql =

    coalesce(

    @sql + 'insert into dbo.SpaceUsed(TableName, Rows, Reserved, Data, Index_Size, Unused) exec sp_spaceused ''' + name + ''',...

  • RE: What is in the Blank space? Data Type is NVarChar

    Try:

    Select unicode(FirstName) From Person Where FirstName <= 'a'

    Then check the value returned against the unicode character set at http://www.unicode.org.

    Does that help?

  • RE: Data Model Advice Needed

    On relational theory, start with Wikipedia, work your way up from there. As usual, it's a good starting place. (As always, just don't use it as a single-source-of-information.)

    Another...

  • RE: Trigger Help

    You're welcome.

  • RE: Data Model Advice Needed

    Personally, I'd be inclined towards option 3.

    With the first one, all it takes is someone saying, "We need to change the first period so it starts at 6 AM", and...

  • RE: String Function Help for address formatting

    Have you looked at simply using the Replace command? That should do what you need with the # symbols.

    As far as getting addresses into fully formatted versions, your best...

  • RE: Trigger Help

    Another option:

    if object_id(N'dbo.Payment') is not null

    drop table dbo.Payment

    go

    create table dbo.Payment (

    ID int identity primary key,

    Ord_ID int,

    Seq_Num int);

    go

    create trigger Payment_Ins on dbo.Payment

    instead of insert

    as

    insert into dbo.Payment (Ord_ID, Seq_Num)

    select distinct Ord_ID, Seq_Num

    from...

Viewing 15 posts - 9,481 through 9,495 (of 14,953 total)