Forum Replies Created

Viewing 15 posts - 6,406 through 6,420 (of 10,144 total)

  • RE: need sql query to convert a column of a table into meaningful data

    mario.balatellii (12/7/2011)


    sorry mike i may sound stupid but where do i get object dbo.Split. and second question is that declaring @message get only on row but in my table if...

  • RE: need sql query to convert a column of a table into meaningful data

    You can certainly do this with TSQL - using the splitter Gianluca mentioned - but it's an expensive long-haul trip:

    DECLARE @Message VARCHAR(8000)

    SET @Message = 'Type=0 8=111 9=HSBC 35=d 49=DAC 56=ALA...

  • RE: Advnaced Grouping Help Needed

    If you're looking for a fixed percentage of random rows from each partition (salesperson), have you considered using NTILE?

    SELECT

    *

    FROM (

    SELECT *, NTILE(10) OVER(PARTITION BY Salesman ORDER BY NEWID()) AS...

  • RE: Are the posted questions getting worse?

    Ninja's_RGR'us (12/6/2011)


    LutzM (12/6/2011)


    Changing subject: Does anyone know one of the DBAinSpace finalists?

    There's no name I recognize as one of the Threadizens....

    There's noone I recognize from this site, period. :crying:

    Wasn't...

  • RE: SQL Code Help

    drew.allen (12/6/2011)


    ChrisM@Work (12/6/2011)


    Now imagine you're writing a query to output cleaned title, firstname, lastname from a table of appallingly bad data. You've set up a shedload of detection and cleaning...

  • RE: SQL Code Help

    drew.allen (12/6/2011)


    ChrisM@Work (12/6/2011)


    drew.allen (12/5/2011)


    ChrisM@Work (12/5/2011)


    You might get one or two ideas from the following. It's proving very usable for data cleansing, which is similar to your scenario - you want...

  • RE: Select the time part of a date.

    Cool, thanks for the feedback. I learned the trick from an article Lowell did years ago 😀 Thanks, Lowell.

  • RE: Select the time part of a date.

    Plus 30 mins to round up:

    SELECT CAST(DATEADD(hour,DATEDIFF(hour,0,DATEADD(minute,30,GETDATE())),0) AS TIME(0))

  • RE: how could i change the procedure???

    Duplicate post, work in progress here.

  • RE: Storeprocedure fetching data only for one condition..

    Duplicate post, work in progress here.

  • RE: storeprocedure not showing any data

    Perhaps usage is supposed to be like this:

    DECLARE @streamid VARCHAR(5)

    SET @streamid = '519'

    SELECT @streamid

    FROM (

    SELECT streamgroupid = '%,519%' UNION ALL

    SELECT '%,519,%' UNION ALL

    SELECT '%519,%' UNION ALL

    SELECT '%519%'

    ) d

    WHERE @streamid...

  • RE: storeprocedure not showing any data

    pallavi.unde (12/6/2011)


    Below is the query in my store procedure..

    SELECT .....

    where b.coursetypeid=@CourseId and b.degreeid=@DegreeId

    and b.streamgroupid LIKE '''%,'+@streamid+',%'''

    and b.streamgroupid LIKE +@streamid+',%'+''

    and b.streamgroupid LIKE ''+'%,''%'+@streamid+''

    and b.streamgroupid LIKE +@streamid+'%'

    end

    query is running...

  • RE: TempDB grows when using temporary table within insert sproc

    Put an index on your temp table. SQL Server will jump through fewer hoops creating the INSERT source.

    CREATE --UNIQUE

    CLUSTERED INDEX [CXscn] ON #glxRDCount (scn ASC)

  • RE: SQL Code Help

    drew.allen (12/5/2011)


    ChrisM@Work (12/5/2011)


    You might get one or two ideas from the following. It's proving very usable for data cleansing, which is similar to your scenario - you want to identify...

  • RE: SQL Code Help

    You might get one or two ideas from the following. It's proving very usable for data cleansing, which is similar to your scenario - you want to identify a case...

Viewing 15 posts - 6,406 through 6,420 (of 10,144 total)