Forum Replies Created

Viewing 15 posts - 1,276 through 1,290 (of 1,923 total)

  • RE: select

    Try this:

    --update table

    --set ecode = NULL

    select * from table

    where

    patindex('%[^0-9]%', @Str) > 0

    or

    ...

  • RE: Returning the last row grouped by part of the fields

    Try this:

    ;with cte as

    (

    select row_number() over ( partition by site_key, p_key order by SiteVR_key desc ) RN ,*

    from #t1

    )

    select * from cte where rn =...

  • RE: SUBSTRING

    Andrew , are u trying to find if your SQL Server Version is 2005 or 2008 ? or rather which version of SQL Server?

  • RE: delete with cursor

    Jaime , how many databases do u have in your system??

  • RE: Find columns with no data

    WILLIAM MITCHELL (8/4/2010)


    Also, because information_schema includes not only tables but views, and has no column to distinguish between them, you have to inspect the results to find which are actual...

  • RE: How to get these results?

    WayneS (8/3/2010)


    ColdCoffee (8/3/2010)


    WayneS (8/3/2010)


    ColdCoffee (8/2/2010)


    Wayne, awesome job in that explanation , mate! Thanks.. Hope the OP now and the other poster got what the code exactly does.

    Also i remember a...

  • RE: How to get these results?

    WayneS (8/3/2010)


    ColdCoffee (8/2/2010)


    Wayne, awesome job in that explanation , mate! Thanks.. Hope the OP now and the other poster got what the code exactly does.

    Also i remember a thread where...

  • RE: Group By WEEK

    WayneS (8/2/2010)


    ColdCoffee (8/2/2010)


    Be careful not all weeks of all locales start on Monday..

    So, you just need to get @@datefirst, and adjust accordingly. Something like:

    declare @DateFirst int

    set @DateFirst = @@datefirst

    SET DATEFIRST...

  • RE: Group By WEEK

    jvanderberg (8/2/2010)


    dateadd(wk, datediff(wk, 0, @ThisDate), 0)

    This will convert a date into the first Monday of the week that contains it. Group on this date.

    Check out Lynn Pettis' wonderful one-stop-shop...

  • RE: How to get these results?

    Wayne, awesome job in that explanation , mate! Thanks.. Hope the OP now and the other poster got what the code exactly does.

    Also i remember a thread where RBarryYoung takes...

  • RE: Data archive

    Going through you request, i found that Table Partitioning might do the trick for you.. Me, in my sytem, implemented this Partition for Archive data; which is maintaining only the...

  • RE: Where In Clause problem

    You cant do that ways... You will have to insert the matching values into a temp table and then join them both.. I have another code as well to accomplish...

  • RE: How to get these results?

    Will this help you, sire?

    WITH CTE AS

    (

    SELECT Cust.ID ,Cust.CustomerName , Cust.OrderDate , Items.ProductName , Items.Quantity

    FROM TestCustomerOrders Cust

    JOIN TestCustomerOrderItems Items

    ON Cust.ID = Items.TestCustomerOrdersID

    )

    SELECT p1.id ,CustomerName...

  • RE: How to get these results?

    Are there any flaws on the data provided, sir? whats the relation between [TestCustomerOrderItems] and [TestCustomerOrders] ??

    Is [TestCustomerOrders].[ID] = [TestCustomerOrderItems] .[TestCustomerOrdersID] ??

  • RE: How to identify edition of setup

    Arun Jebakumar (7/30/2010)


    well, I would take it as there is no other way possible :hehe:

    Cool man :cool:, i wondered if u would take that lightly! Well, nicee... 😉

Viewing 15 posts - 1,276 through 1,290 (of 1,923 total)