Viewing 15 posts - 1 through 15 (of 16 total)
Is 80 compat mode available in SQL server 2008?
Thanks,
Pandeeswaran
June 9, 2012 at 7:23 pm
Is it possible to simulate ANSI 89 notation in the current SQL server 2012?
Thanks,
Pandeeswaran
June 9, 2012 at 11:25 am
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...
Thanks,
Pandeeswaran
December 29, 2011 at 8:28 am
i believe, it's not possible in PIVOT since i have only one field here.
Thanks,
Pandeeswaran
December 29, 2011 at 7:42 am
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
Thanks,
Pandeeswaran
December 29, 2011 at 7:31 am
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...
Thanks,
Pandeeswaran
December 24, 2011 at 10:35 am
Merry Christmas to everyone in this world
Thanks,
Pandeeswaran
December 24, 2011 at 9:12 am
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...
Thanks,
Pandeeswaran
August 29, 2011 at 10:58 am
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
Thanks,
Pandeeswaran
August 29, 2011 at 10:48 am
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...
Thanks,
Pandeeswaran
August 28, 2011 at 11:34 pm
Vishal.Gajjar (7/29/2011)
Try This:
SELECT OBJECT_NAME(OBJECT_ID) TableName, st.row_countFROM 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.
Thanks,
Pandeeswaran
July 29, 2011 at 4:20 am
Yes. But is it possible via t-SQL?
Thanks,
Pandeeswaran
July 28, 2011 at 4:21 am
Regex Replace won't be faster than the nested replaces. .
May i know how?
Thanks,
Pandeeswaran
June 27, 2011 at 1:12 am
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...
Thanks,
Pandeeswaran
June 26, 2011 at 4:52 am
Viewing 15 posts - 1 through 15 (of 16 total)