Forum Replies Created

Viewing 15 posts - 991 through 1,005 (of 2,007 total)

  • RE: How to get total count when using Row_Number() as subquerry

    Formatted for my sanity

    ALTER PROCEDURE [dbo].[uspUtbProfessionals_Paging] @startRowIndex INT, @pageSize INT, @totalCount INT out

    AS

    BEGIN

    SET NOCOUNT ON;

    SET @startRowIndex = @startRowIndex + 1

    BEGIN

    SELECT *

    FROM (

    SELECT *, ROW_NUMBER() OVER (ORDER BY ProfessionalID ASC) AS...

  • RE: Are the posted questions getting worse?

    GSquared (1/31/2012)


    BrainDonor (1/31/2012)


    Somebody is about to submit an astounding piece of homework http://www.sqlservercentral.com/Forums/FindPost1244144.aspx

    Ah the temptation to post a solution using Union All and a Pivot operator to avoid using Join!...

  • RE: Pivot table???

    Test, test and test some more!!

    When you figure out which of the multitude of solutions works best for your situation, that's the one to use.

  • RE: Merge Columns of different tables

    :Whistling:

    SELECT id, CONVERT(INT,SIN_ID) AS SIN_ID, CONVERT(VARCHAR(30),AgentCode_ID) AS AgentCode_ID,

    CONVERT(DECIMAL(5,2),Amount) AS Amount

    FROM (SELECT id, CONVERT(VARCHAR(200),SIN_ID), 'SIN_ID'

    FROM #table1

    UNION ALL

    ...

  • RE: Pivot table???

    PaulB-TheOneAndOnly (1/31/2012)


    GrassHopper (1/30/2012)


    Can you show me an example of what you mean? I don't follow you.

    Probably a dozen ways to do it, here goes one...

    create table #mytable

    (tocid decimal,

    prop_id decimal,

    str_val...

  • RE: Date format

    soulchyld21 (1/31/2012)


    I have a date field in one of my tables and am having issues with the format, some records are not being inserted into the table because of this,...

  • RE: Taking Notes – Paper or Keyboard?

    Pen and paper to create a mind map while the meeting/lecture/session is going on. Also, I record meetings/lectures/sessions with my usb dicatphone.

    When the meeting/lecture/session is over, I'll use a combination...

  • RE: TSQL to return column headers (but no rows)

    Waiting for some code to compile, so here's another methods 😀

    DECLARE @sql AS NVARCHAR(MAX),

    --Set your table name here

    @TABLE AS NVARCHAR(100) = 'TC70'

    SELECT @sql = COALESCE(@SQL,'') + ',' + CHAR(13)...

  • RE: Find the no of hours and minutes between two datetime values

    dhanalakshmi 99938 (1/29/2012)


    Thanks for your help. It was exactly what i was searching for. I realize that subtracting the break period from both starttime and endtime is the right thing...

  • RE: Concatenating strings into one row

    Here's a couple of options: -

    BEGIN TRAN

    CREATE TABLE #temp(

    company VARCHAR(50) NOT NULL,

    details VARCHAR (200) NULL ,

    details2 VARCHAR (200) NULL ,

    code VARCHAR (50) NULL)

    INSERT INTO #temp VALUES( 'td tech', NULL, NULL,...

  • RE: COUNT No of occurrances in a text field

    AccidentalDBA:) (1/27/2012)


    Hello All

    Does anyone know how to count the number of occurances of a string within a text field, i have tried

    SELECT (DATALENGTH(REPLACE(xml_text, '<TAG', '')) - DATALENGTH(xml_Text) )

    FROM xml_TEXT_table

    However,...

  • RE: Case Statement should have IN

    sami.sqldba (1/27/2012)


    Hi All

    I feeling very odd to ask but i am really really very confused by this how to make order by when query have union or union all

    Just wanted...

  • RE: Case Statement should have IN

    sami.sqldba (1/27/2012)


    Hi Friends

    I have a issue which i am not aware bec myself getting surprise to it..

    I have a where condition for a year based on case i need to...

  • RE: how write split function for this store procedure

    er.sivaganesh (1/27/2012)


    i just want split function

    for tblchapters in a course there will be lot of chatpters

    chatpter 1

    chapter 2 that

    split function will be...

  • RE: Are the posted questions getting worse?

    Evil Kraig F (1/27/2012)


    Roy Ernest (1/26/2012)


    Somebody please put the brakes on the THREAD. It keeps moving from one random topic to another. It does not even care who gets run...

Viewing 15 posts - 991 through 1,005 (of 2,007 total)