Viewing 14 posts - 1 through 14 (of 14 total)
Yes, Eugene's solution worked with compatibility_level=100 when I tested in my local machine.
select D.Item as [Category], COUNT(*) AS Count
from dbo.TestCategory as T
cross apply
(
select * from dbo.fnSplit(T.[Category],'/')
) as...
March 15, 2013 at 1:15 pm
I found in other forums that "cross apply" only works if the compatibility_level is greater than 80.
When I checked the compatibility_level of our database, it's 80.
SELECT compatibility_level
FROM sys.databases WHERE name...
March 14, 2013 at 3:08 pm
I tried and I got another error for both @mytable and TestCategory
Error:
Msg 102, Level 15, State 1, Line 4
Incorrect syntax near '.'.
And I tried with select after cross apply....
March 14, 2013 at 2:28 pm
Awesome Alan's code works perfect !!!
I changed "#classes" to my table name "TestCategory" and it gave the result that I expected.
Thank you Alan. and also thank you Eugene Elutin.
How to...
March 14, 2013 at 12:24 pm
Actually I copied your code and also a function
declare @mytable table (SNo int, Category varchar(100))
insert @mytable
select 1, 'XML/HTML'
union select 2, 'ASP.NET'
union select...
March 14, 2013 at 12:17 pm
Thank you SSCrazy for your quick reply.
Now, I got the following error:
"Category" is not a recognized table hints option. If it is intended as a parameter to a table-valued function...
March 14, 2013 at 11:49 am
I am using MSSQLServer 2008 and I got the same error (Package 'Microsoft SQL Server Management Studio' failed to load) since last couple of days.
I tried with this solution...
January 28, 2010 at 7:44 am
Yes, as Lowell said "a backup created on 2008 can only be restored on a 2008 instance"
If you need to copy the database from sql server 2008 to sql server...
December 21, 2009 at 2:28 pm
Currently What I am doing in my job is
I have given IP[Lets say IPfirst], Username and Password to login another machine through Remote Desktop.
I found all the websites are in...
December 18, 2009 at 1:07 pm
Dear Ray,
I don't know much more about the purpose of that xml file. But I was asked my senior to generate an xml file from the database table and put...
December 18, 2009 at 12:01 pm
GSquared,
Thank you very much.
This is the perfect solution.
create table dbo.Numbers (
Number int primary key);
go
insert into dbo.Numbers (Number)
select top 10001 row_number() over (order by t1.object_id) - 1
from sys.columns t1
cross...
December 14, 2009 at 1:49 pm
Actually I am trying to search in a table using comma separated value.
I found the code in forum section to convert comma separated string to table
And I am trying...
December 14, 2009 at 12:45 pm
I have created a trigger to export a table to xml.
The code between begin and end works fine, if i run separately.
When I put this code in trigger and execute...
December 1, 2009 at 8:21 am
I have an xml file EmpXmlFile.xml in C:\test folder(c:\test\EmpXmlFile.xml)
<Employees>
<Employee>
<Name>Roshan</Name>
<Address>New York</Address>
<Phone>123-456-7890</Phone>
<Employee>
<Employees>
and database name "EmployeeDB" with a table "tblEmployee"
tblEmployee(Name,Address,Phone)
So, I need to append an Xml node (Employee node) in Xml file (c:\test\EmpXmlFile.xml)...
November 27, 2009 at 7:11 am
Viewing 14 posts - 1 through 14 (of 14 total)