Forum Replies Created

Viewing 15 posts - 9,196 through 9,210 (of 15,381 total)

  • RE: How to split query result into seperate columns

    What you are referring to is called a cross tab or pivot. See the articles in my signature about those topics.

  • RE: how to execute timestamp querry in sql server 2008 ?

    atikpatil2005 (3/4/2013)


    I am T.E. I.T. student & these sem we have dbms subject but i am so confussed how to write date & time querry in sql server...

  • RE: using locks in sql server 2005

    vinodkel (3/1/2013)


    thanks for your kind reply:-)

    agreed, constraint can be used instead of trigger.

    but the requirement is something different, if i use constraint it will check the defined uniqueness within the...

  • RE: Custom order in SELECT

    Lowell, you would have to add a where clause to only return those rows that match. Notice below this will return a cartesian product.

    select *

    from @test1 t

    OUTER apply dbo.delimitedsplit8k('d;c;b;a;e',';')...

  • RE: Custom order in SELECT

    To do this you will first need to parse your delimited string. The easiest way to parse a delimited string like is to use DelimitedSplit8K. You can find out about...

  • RE: Select full month number (with 0)

    ScottPletcher (3/1/2013)


    Sean Lange (3/1/2013)


    ScottPletcher (3/1/2013)


    Or simply:

    SELECT CONVERT(char(2), myDate, 1)

    I don't think will quite work Scott. The OP said they are using month(MyDate) which will return an int. Casting a single...

  • RE: Exclude similar columns in a JOIN command

    RZ52 (3/1/2013)


    Dear Sean,

    Thanks for help.

    I know how much headache I will get to find a stable solution but your suggestion is a really helpful starting point.

    I will work on...

  • RE: Select full month number (with 0)

    ScottPletcher (3/1/2013)


    Or simply:

    SELECT CONVERT(char(2), myDate, 1)

    I don't think will quite work Scott. The OP said they are using month(MyDate) which will return an int. Casting a single digit int to...

  • RE: Exclude similar columns in a JOIN command

    What a nightmare!!! Nothing like creating queries against a moving target. I know it isn't your design but the nightmare you are dealing with is because of the lack of...

  • RE: Exclude similar columns in a JOIN command

    RZ52 (3/1/2013)


    Hi,

    I have three tables and the structures are :

    Table1 : [PATIENT_ID],[Name],[Age],[City],[TEST1],[TEST2]...... (the AB? are test names dynamically added to table)

    Table2 : [PATIENT_ID],[Name],[Age],[DR1],[DR2],...... (the DR? are drug names dynamically added...

  • RE: Using a Variable for an IN Predicate

    Jeff Moden (3/1/2013)


    Sean Lange (3/1/2013)


    Irozenberg 1347 (3/1/2013)


    Elementary sub-query or EXISTS clause would

    Radically improve performance.

    If you like fancy coding you could pass XML as

    parameter and use XQUERY.

    You should...

  • RE: Using a Variable for an IN Predicate

    Irozenberg 1347 (3/1/2013)


    Elementary sub-query or EXISTS clause would

    Radically improve performance.

    If you like fancy coding you could pass XML as

    parameter and use XQUERY.

    You should read the article about...

  • RE: Need to create a Scalar Valued Function

    sql1411 (2/28/2013)


    Hi Lowell,

    Thanks for your response. This is what I needed. However, is it possible to embed this logic to create a scalar valued function so that I can use...

  • RE: Help getting all the weeks between two random dates for each row

    spencer_robinson (2/28/2013)

    So thanks for your help, though that Tally table is still making me sratch my head - Time to look up some tutorials. 🙂

    Try this one!!! http://www.sqlservercentral.com/articles/T-SQL/62867/%5B/url%5D

    Glad that my...

  • RE: Compare the rowcount

    kk2286 (2/28/2013)


    Thanks for you quick reply.

    I have inserted few records and chnged the date time column.

    Time_Stamp Row_Count

    2013-02-28 09:44:08.760 22

    2013-02-28 10:44:20.017...

Viewing 15 posts - 9,196 through 9,210 (of 15,381 total)