Forum Replies Created

Viewing 15 posts - 2,056 through 2,070 (of 2,458 total)

  • RE: Tally OH! An Improved SQL 8K “CSV Splitter” Function

    Forgive me if the code to do this has already been posted but I had a requirement for a greater-than-8k splitter. I made the following changes:

    1) Changed @pString to...

  • RE: udf very slow?

    Jeff Moden (10/31/2013)


    Eric Mamet (10/31/2013)


    I know but I was hoping it would be fast...

    Just talked to my customer and I'll try using CLR!

    Yipee!!! 😀

    Heh... hate to throw a...

  • RE: XML element contains foreign language

    No Problem:-)

  • RE: udf very slow?

    I know but I was hoping it would be fast...

    Just talked to my customer and I'll try using CLR!

    Yipee!!!

    I don't know if a CLR is going to be the...

  • RE: XML element contains foreign language

    I've run into this before. Take a look at this article: http://nerdwords.blogspot.com/2010/01/sql-server-error-conversion-of-xml.html

  • RE: Running Count

    mickyT (10/29/2013)


    And so far Dwains Tally solution looks like the winner based on the IO stats:-D

    As far as speed is concerned, mine is still in the top 5!

  • RE: Slow Query

    First, is the application executing a stored procedure or an Ad Hoc SQL Query? If it's Ad Hoc SQL you will want to put the query into a stored procedure....

  • RE: Running Count

    There should be a way to do this without these self-joins but I can't figure it out. That said, this will do the trick:

    WITH distinct_ids AS

    (

    select DISTINCT t1.id, MAX(t2.rnk)...

  • RE: Issue ,Getting Only One Child Node by sp_xml_preparedocument.

    harsimranjeetsinghwasson (10/24/2013)


    Not Able to get Assistant days now by open xml

    DECLARE @Payrollhandle int

    DECLARE @Payrolldoc VARCHAR(MAX)=

    ('<Payroll StartDate="2013-10-30" EndDate="2013-10-31">

    <Doctor ID="74962">

    <WorkDays>

    <Office ID="60101" Days="23"/>

    <Office ID="60102" Days="23"/>

    </WorkDays>

    <AsstDays>

    <Office ID="60101" Days="23"/>

    <Office ID="60102" Days="23"/>

    </AsstDays>

    </Doctor>

    </Payroll>')

    EXEC SP_xml_preparedocument @Payrollhandle OUTPUT,@Payrolldoc

    SELECT

    *...

  • RE: Not able to get multiple rows

    XML questions don't always get much love around here. Here's what you are looking for:

    EXEC SP_xml_preparedocument @Payrollhandle OUTPUT,@Payrolldoc;

    SELECT A.*, B.AsstDaysOfficeID

    FROM

    OPENXML(@Payrollhandle,'Payroll/Doctor/WorkDays/Office',8)

    WITH

    (DoctorID INT '../../@ID',

    WorkDaysOfficeID VARCHAR(10) './@ID') AS A

    OUTER APPLY

    OPENXML(@Payrollhandle,'Payroll/Doctor/AssDays/Office',8)

    WITH...

  • RE: Sql Server data replication

    Is it possible to setup replication/Mirroring to a database server which is not in our windows domain?

    Yes but it will be more work to secure.

    We have a database of...

  • RE: Alternative to SSRS...

    I am only familiar with SSRS (and another tool I will mention in a moment) but have seen others have luck with Cognos and Tableau for OLTP and OLAP environments....

  • RE: SSRS: optional parameter, grouper, column display.... is it possible

    mario17 (10/28/2013)


    Hi,

    I'm trying to make one of parameter and grouper in my SQL optional, is it possible, for now I'm thinking:

    1. in SSRS make parameter UseParam1 = Y/N

    ...

  • RE: Inline Query

    manickavasagam.g (10/25/2013)


    declare @BDate datetime = '01 jan 1990'

    select DATEDIFF(yy,@BDate, getdate()) as AgeInYears, DATEDIFF(mm,@BDate, getdate()) as AgeInMonths, DATEDIFF(WW,@BDate, getdate()) as AgeInWeeks

    Take a look at what happens when you change @BDate to...

  • RE: Inline Query

    todd.ayers (10/24/2013)


    How could I write a sql statement to where I could get an age in one field based off typing a date in another field?

    I am trying to get...

Viewing 15 posts - 2,056 through 2,070 (of 2,458 total)