Forum Replies Created

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

  • RE: Person data- Multiple rows due to more than 1 name. Automatic Numbering of rows

    The way I would solve that problem is to use a temp table.

    Step 1: Insert all the names into a temp table that contains an IDENTITY column, sorted by the...

  • RE: @@TRANCOUNT incremented when SP is started, not when BEGIN TRAN is executed

    Having the text of the stored procedure would help us to determine the problem. Please post it if you have it available.

  • RE: Date format

    You may also be able to change the default date format for your session so that it correctly interprets the pieces.

    http://msdn.microsoft.com/en-us/library/ms189491.aspx

  • RE: Format Data for SQL Query

    I can think of two ways, and I have done both.

    The first method is to add a column in Excel that formats the numbers as you want them, typically something...

  • RE: Weird AND Problem

    SQLKnowItAll (1/25/2012)


    Where is this query being executed from; i.e. a text file, SSMS, 3rd party query editor?

    As far as I recall, the code was copied from a hosted SVN service...

  • RE: Weird AND Problem

    Different text editors use different line terminators so it is possible that a different machine was reading whatever combination of CHAR(13) and CHAR(10) was being used to terminate the line...

  • RE: Nasty Deadlock Issues

    For anyone else trying to read the SQL plan files, when I downloaded them, they showed up with an "xml" extension so I had to rename them with a "sqlplan"...

  • RE: Get next 1st thursday

    Because we know that the first Thursday of a month must be within 40 days of the selected date and must have a day number between 1 and 7, I...

  • RE: cte delete operation

    A CTE works only with a single statement. You appear to be trying to use several statements with the CTE; the SET of a variable, then a SELECT, then...

  • RE: Nasty Deadlock Issues

    Having the contents of the temporary procedures and the "offending" statements would help. Also, I am not able to view the SQL plans that are attached; I click the...

  • RE: Weird AND Problem

    This may be unrelated, but I had a problem once with a query that acted very strangely. Long story short, there were unprintable characters in the texgt that were...

  • RE: Pad table rows with zeros for the last 5 years

    Let's see if I understand correctly.

    1 - You want data in the "detail" section for the last five years only, 2008 - 2012.

    2 - Any gifts prior to five years...

  • RE: Get next 1st thursday

    Jonathan,

    Nearly but not quite, that just gets next thursday. Not the next first thursday of the month.

    I misread the original post. I thought the goal was to find...

  • RE: Pad table rows with zeros for the last 5 years

    Having the desired output as a sample would be helpful. I see the 2006 data in the table but I don't see it in the output of the query...

  • RE: t-sql ,sql server 2000

    The easiest way to compound rows is to CROSS JOIN to another set. The query below returns one row for each record from the system table that stores object...

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