Forum Replies Created

Viewing 15 posts - 376 through 390 (of 660 total)

  • RE: TSQL Tuning

    Wildcat (6/24/2008)


    Besides the INDEX part,

    (convert(VARCHAR(6), CombinedTT.StartTime, 112)= '{?Period}')

    ---- this one takes longer in WHERE clause.....

    Better move the CONVERT into your SELECT...UNION ALL....part

    Hey I tried this but didnt help me...

  • RE: TSQL Tuning

    pls find the attachement for execution plan.

    thanks for the concern.

  • RE: TSQL Tuning

    please check the atttachments for table structures.

    Right now its taking more than 20min . each table has 3574385 records approx.

  • RE: TuningProc

    Hey I got a new error from your proc.

    Msg 209, Level 16, State 1, Procedure xSynPortalToSolomon_ProgTEST, Line 117

    Ambiguous column name 'programid'.

    I checked at that column everything looks fina in my...

  • RE: TuningProc

    Thank you very much, you did most my work.

    when i exec the proc i get this error.

    OLE DB provider "SQLNCLI" for linked server "LS_PORTAL" returned message "The partner transaction manager...

  • RE: TuningProc

    Exactly.

    Can you pls update my proc with your best performance ideas.

  • RE: TuningProc

    If you cant read attachement, look at this

  • RE: Query

    CREATE TABLE #tempdays (

    PK INT IDENTITY(1,1) PRIMARY KEY CLUSTERED,

    days VARCHAR(255)

    )

    INSERT INTO #tempdays select SelectedDays from FAS_LaborCalendar

    --select * from #tempdays

    select pk,count(*) from (

    SELECT lc_id pk,SUBSTRING(';'+SelectedDays+';',pk+1, CHARINDEX(';',';'+SelectedDays+';',pk+1)-pk-1) AS Value ...

  • RE: Query

    Matt Miller (6/16/2008)


    select pk, count(*)

    from

    (SELECT lc_id pk,

    ...

  • RE: Query

    but for the function i can pass string a parameter, how can i pass my select query so tht I can iterate through each row.

  • RE: Query

    I have a function where if i pass parameters (string,delimiter) it gives each row. something like

    If Run this

    select * from dbo.myfunction('1;2;3;4;11;10;9;8;7;14;15;16;17;18;25;24;23;22;21;28;30;29',';')

    I get result as

    1

    2

    3

    4

    11

    10

    9

    8

    7

    14

    15

    16

    17

    18

    25

    24

    23

    22

    21

    28

    30

    29.

    How Can i...

  • RE: Query

    thanks matt

    I am not getting about Tally table and value N from your query.

  • RE: Query

    this is my table structure

    CREATE TABLE [dbo].[FAS_LaborCalendar](

    [LC_Id] [int] IDENTITY(1,1) NOT NULL,

    [ProgramInstanceId] [int] NOT NULL,

    [FiscalPeriod] [varchar](6) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,

    [HoursPerDay] [float] NOT NULL CONSTRAINT [DF_FAS_LaborCalendar_HoursPerDay] DEFAULT ((8)),

    [NumberOfDays] [int] NOT NULL...

  • RE: Query

    thanks guys..

    i cant change the design. I just want the result as i need and doesnt mind if am using temp table or any long tsql query.

    I am not sure...

  • RE: Query

    any help?

Viewing 15 posts - 376 through 390 (of 660 total)