Forum Replies Created

Viewing 15 posts - 1 through 15 (of 15 total)

  • RE: sql server 2005 join notation

    Is 80 compat mode available in SQL server 2008?

  • RE: sql server 2005 join notation

    Is it possible to simulate ANSI 89 notation in the current SQL server 2012?

  • RE: help in the below scenario

    Awesome! thanks!

  • RE: help in logic

    the below code works fine:

    SELECT STUFF( -- Remove first comma

    (

    SELECT ', ' + [ID] FROM -- create comma separated values

    (

    SELECT cast([ID] as VARCHAR) as [ID] FROM test...

  • RE: help in logic

    i believe, it's not possible in PIVOT since i have only one field here.

  • RE: help in logic

    No. This is not a business requirement. and just i want to achieve this in sql server.

    i am looking in PIVOT to do this.

    Thanks

  • RE: Stored Procedure execution

    So,if we have a s.p in DBO schema, then can't we have the S.P with the same name in different schema?

    In my case i am also having the S.P under...

  • RE: More jobs using SQL Server than Oracle

    Merry Christmas to everyone in this world

  • RE: Help in joining two fields

    A1,1,100

    A2,1,200

    1,60

    1,30

    1,30

    1,20

    1,55

    1,20

    1,15

    1,30

    1,25

    1,5

    1,20

    For the above data,

    A1 value is 100

    in table2 ,the first value is 60

    So add the next value=60+30=90

    then add the next value=90+30=120>100 so omit the 3rd valueand add 90 with the...

  • RE: Help in joining two fields

    As a rule, we can have first matching combination to be selected:

    for Mr.Lutz example,we can put A1 for first occuring combination(30,30,20,20).

    Please let me know if you need any more information.

    Thanks

  • RE: Help in joining two fields

    Now there's a slight change in my requirement:

    --------------------------------------------------------------------------------

    Name,id,value

    --------------------------------------------------------------------------------

    A1,1,100

    A2,1,200

    B1,2,100

    B2,2,200

    table2

    --------------------------------------------------------------------------------

    id,value1

    --------------------------------------------------------------------------------

    1,50

    1,25

    1,25

    1,100

    1,100

    2,50

    2,50

    2,150

    2,50

    My result should be:

    Name,id,value

    --------------------------------------------------------------------------------

    A1,1,50

    A1,1,25

    A1,1,25

    A2,1,100

    A2,1,100

    B1,2,50

    B1,2,50

    B2,2,150

    B2,2,50

    if you take the value of A1 in table1=100

    so the sum(values of A1 in result)=50+25+25=100.

    But the order in which the...

  • RE: Alternative to count(*)

    Vishal.Gajjar (7/29/2011)


    Try This:

    SELECT OBJECT_NAME(OBJECT_ID) TableName, st.row_count

    FROM sys.dm_db_partition_stats st

    WHERE OBJECT_NAME(OBJECT_ID) = N'TableName'

    Will it give the exact result similar to COUNT(*) or it depends on the last analyzed time?

    thanks.

  • RE: Trigger On SELECT

    Yes. But is it possible via t-SQL?

  • RE: Converting a string to a generalized format

    Regex Replace won't be faster than the nested replaces. .

    May i know how?

  • RE: Converting a string to a generalized format

    Yes! Obviously it can be achieved via nested replace statements.

    But i still wonder that why REGEXP_REPLACE is not yet introduced in Sql Server.

    I am expecting this in the next release.

    If...

Viewing 15 posts - 1 through 15 (of 15 total)