Forum Replies Created

Viewing 15 posts - 106 through 120 (of 424 total)

  • RE: coalesce negative values

    the list is individual columns of floats. i thought of stringing them together and using my fListToFloats(list,delim) function but i'd like something cleaner, especially since i need to do...

  • RE: cross tab or pivot data help

    the code i gave you should produce the correct fiscal year number. all you need to do is qualify the query with the start of last year's fiscal year:

    Shiftdate...

  • RE: Mgmt Studio Query editor, Results/Messages area

    thanks. that's annoyed me for months! i kept looking in the View menu and never noticed that option in the Window menu.

  • RE: cross tab or pivot data help

    A column named TotalHours is not present in your dbo.TimesheetDetails table. Change TotalHours to the appropriate column.

  • RE: Ascii code spaces

    ascii code 160 is a non-breaking space. it is different than a normal space (ascii code 32). it's used a lot in html [& nbsp ;]

    if...

  • RE: cross tab or pivot data help

    jerrym (7/7/2008)


    Hi folks

    wondering if someone could help me with the following issue in creating the sql

    i have a table called 'TimesheetDetails' with columns 'TimesheetID' 'Shiftdate' 'Totalhours'

    workers daily timesheet info is...

  • RE: Summing with Hierarchy's

    if your heirarchy is just 2 levels (parent, child), then just group by ParentId.

    select ParentId, sum(Amount) as total

    from {table}

    group by ParentId

    if your heirarchy is open-ended, you'll need to use a...

  • RE: eliminate nested while loop

    this should get you started.

    declare @xml xml

    set @xml ='<root>

    <a ID = "1" />

    ...

  • RE: create a function to make columns into rows

    XML alternative:

    SET ANSI_NULLS ON

    GO

    SET QUOTED_IDENTIFIER ON

    GO

    create function [dbo].[fListToVarchars]( @list varchar(max), @delim varchar(16) )

    returns @returnTable table

    ( item varchar(255) not null, itemSequence smallint not null )

    as begin

    ...

  • RE: UPDATE .... SET .Write

    .write() is an in-place edit (ergo the minimal logging) and will perform faster. if you've got a 10mb column value and only want to change/add 400 bytes of data,...

  • RE: Query a List of user databases

    i've seen rare instances where the system dbs were not ids 1-4 due to restores of corrupted dbs. and in the shops i have influence over SA never owns...

  • RE: Query a List of user databases

    Dont depend on the database id since there may be new system databases introduced in the future. use sys.databases.owner_sid instead.

    [font="Courier New"]select ... from sys.databases where owner_sid != 1[/font]

  • RE: Insert Into Question

    It seems that a table that has 1 row for each number_of_months like this should get you started:

    declare @Months table ( month int, primary key ( month ) )

    insert...

  • RE: Dynamic USE clause

    David Kranes (7/3/2008)


    I am trying to execute the following code but it does not seem to be setting context to the database using the execute (@SQL). It seems to...

  • RE: Dynamic USE clause

    David Kranes (7/2/2008)


    I was actually using a while loop but am not able to dynamically set the USE clause. How are you doing that. I need to set...

Viewing 15 posts - 106 through 120 (of 424 total)