Forum Replies Created

Viewing 15 posts - 916 through 930 (of 2,007 total)

  • RE: Hierarchy Query

    cdh-727733 (2/8/2012)


    Sorry I missed the @level variable completely somehow. That seems to work well for the 3 tier scenario.

    I tried it on the 4 tier and I can't get it...

  • RE: Query to change rows as columns

    balu-1123884 (2/8/2012)


    Hi,

    I have table like

    Name Type ...

  • RE: Parameter Sniffing

    david.alcock (2/8/2012)


    I just wanted a little bit more information on parameter sniffing as we have a web application that utilises some search functionality, so parameters are passed via a stored...

  • RE: Replace Function issue

    SGT_squeeqal (2/8/2012)


    Cast your column as varchar(MAX) first

    select REPLACE (cast(col as varchar(max)),'value','replace_value')

    That won't work in SQL Server 2000, which is this forum.

    Untested, but could you split it into chunks, run your...

  • RE: Hierarchy Query

    cdh-727733 (2/8/2012)


    No worries thanks for your perseverance!

    I can't seem to get it to produce the correct results though.

    If @levelID is set to null and h.ID is set to 1 then...

  • RE: Compare two table rows and get modifed records

    SQL Kiwi (2/8/2012)


    Koen Verbeeck (2/8/2012)


    I believe this will work:

    Doesn't account for NULLs.

    SELECT

    t2.*

    FROM dbo.temp1empdtls AS t1

    JOIN dbo.temp2empdtls AS t2 ON

    t2.empno = t1.empno

    WHERE...

  • RE: Compare two table rows and get modifed records

    suhailquadri (2/8/2012)


    Thanks a million.. which is very simple and easy. You are a champ!!

    Just so you know for sure, you only ever need one post on a topic. Posting multiple...

  • RE: Compare two table rows and get modifed records

    BEGIN TRAN

    --Your sample data

    CREATE TABLE temp1empdtls (empno INT, empname VARCHAR(50), age INT)

    INSERT INTO temp1empdtls

    VALUES (11, 'John', '38')

    INSERT INTO temp1empdtls

    VALUES (12, 'Eric', '20')

    INSERT INTO temp1empdtls

    VALUES (13, 'Adam', '40')

    CREATE TABLE temp2empdtls (empno...

  • RE: Hierarchy Query

    cdh-727733 (2/7/2012)


    Thanks for all your efforts much appreciated.

    It does seem to mostly work with the example data - I even put in a 4th category level and it returned that.

    However...

  • RE: Convert concatenated varchar date and time to datetime

    See this thread for methods of ensuring that correct dates are used in your convert.

  • RE: Hierarchy Query

    cdh-727733 (2/7/2012)


    Ah sorry I need the next level down of category not the product level itself, so if we pass the category id of 3 (Drills) that needs to grab...

  • RE: Hierarchy Query

    cdh-727733 (2/7/2012)


    It is yep - sorry it's hard enough for me to wrap my head round what I need this to do let alone expect someone to pick up the...

  • RE: Hierarchy Query

    cdh-727733 (2/7/2012)


    No I think it's me being dense sorry.

    So in my result set I just want the categories that match.

    So if I feed in search critera and the selected category...

Viewing 15 posts - 916 through 930 (of 2,007 total)