Forum Replies Created

Viewing 15 posts - 1,636 through 1,650 (of 2,894 total)

  • RE: Run query it takes 16 seconds run stored procedure never finishes

    pamozer (5/3/2012)


    Sorry about that. Also when I run a trace against the stored proc it doesn't get past the first Insert.

    ...

    How do you know this? Have you...

  • RE: Issue with duplicate data

    Oh, I see what you mean now.

    Change ORDER BY to:

    ORDER BY [Employee Name]

    ,CAST('01 '+ [Month] + ' ' + CAST([Year] AS VARCHAR)...

  • RE: Issue with duplicate data

    ...

    However, I am still unable to get back the year format display from January to December, it displaying in ascending order format from April to September now.

    Would you know how...

  • RE: Issue with duplicate data

    ...

    Oh really , I dont know why it shows up Actual hours as 15:11:00 when I run it in SQL. Also I am unable to get the months format from...

  • RE: insert 100 rows without using loop or union etc.,

    drew.allen (5/3/2012)


    I agree with you that CROSS JOIN being explicit is a superior syntax, for readability mainly. I don't use commas that way for that exact reason. But...

  • RE: Run query it takes 16 seconds run stored procedure never finishes

    pamozer (5/3/2012)


    I have a stored procedure that never finishes. I run the query inside the stored procedure and it takes 17 seconds.

    Any thoughts? ...

    I have one:

    It's not working...

  • RE: String extraction

    komal145 (5/3/2012)


    string extraction:

    Hi,

    1)IF input = SampleDoc (07)

    o/p should be sampledoc(07)

    2) For '/Customer Service/CS Team - 2/New Document2'

    needed CS Team - 2

    3)/Enrollment Analyst/Enrollment Analyst 1

    needed: Enrollment Analyst 1

    4) For '/Indexing/Indexing 2/General...

  • RE: Write all the records of a table to a text file on the local disk with in T-SQL (SP)

    BCP doesn't need user name and password more than any other possible method (stored proc, sql batch script etc,) and it's good for what you asking for.

    Use -T...

  • RE: Issue with duplicate data

    Based on data provided there are no discrepancies in a query results:

    Employee NameMonthYearWorking HoursActual HoursHrs_DiffMin_DiffS Cat2 HoursM Cat2 HoursB Cat2 HoursR Cat2 Hours

    VishalMay201228:00:0029:11:001110:00:000:00:000:00:000:00:00

    Working Hours are correct: 28:00:00 (as per...

  • RE: Issue with duplicate data

    I need underlying data, not the results.

    Can you give me data insert statements for Staff and StaffDate tables for this gentlemen and month May2012.

  • RE: Issue with duplicate data

    Can you post exact underlying time data which doesn't add up when summed?

  • RE: Issue with duplicate data

    Your requirements are complicated enough, coding without style adds up...

    Do you remember my joke about noodles? So, code-noodles good for lunch, but it's hard to work with.

    First what I have...

  • RE: Inserting Records Into Table For Months Between Acquisition And Today

    imex (5/3/2012)


    Try:

    with CTE as

    (

    select PortfolioId, AcquisitionDate from MyTable

    union all

    select PortfolioId, DATEADD(month, 1, AcquisitionDate) as AcquisitionDate

    ...

  • RE: Issue with duplicate data

    Could you please specify what results should look like exactly from sample data you posted.

    I cannot see where you are trying to group by category2_id in your query ...

  • RE: Query Syntax

    GilaMonster (5/3/2012)


    This is why you should always use qualify your column names.

    This would have thrown an error.

    SELECT *

    FROM @TABLE1 AS T1

    INNER JOIN @TABLE2 AS T2 ON T1.VALUE =...

Viewing 15 posts - 1,636 through 1,650 (of 2,894 total)