I have a domain interface
public interface ITicket
{
...
TicketWorkflowStatus StatusId{get;set;} // Enum
}
but the linq-to-sql persistance layer on the database wants to use int, can I change it in the dbml so that the local type is TicketWorkflowStatus? What are my options?
Hello everyone,
I am looking for some reference/samples about how to define good KPI for education industry. I want to define KPI from school/department management perspective to measure various school performance, students/faculty/others.
Any advice, referneces or documents are appreciated -- more appreciated if with the context of SQL Server 2005/2008.
thanks in advance,
George
Whats wrong with my query?
ALTER TABLE test_posts ADD sticky boolean NOT NULL default = false
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '=false' at line 2
Given a table (id, col1, col2), does it make sense to create the following indexes:
Index1 (col1) not unique
Index2 (col1, col2) not unique
I am faced with a legacy database that is full of those.
Can I safely delete Index1? Anwser needed for SQL Server and Oracle.
Trying the following code. But getting 'The argument 1 of the xml data type method "modify" must be a string literal' error. searched alot but cant find any solution for this problem
SET @Path = '/@ParentNodeName/@NodeName/child::*'
SET @x.modify('insert attribute status {sql:variable("@status")}
as first into (' + @Path + ')[1]')
Can a Timestamp (rowversion) column in a SQL Server table be queried? If so, how?
I'd like to do something like this:
Select * From MyTable Where MyTimestampColumn = "???"
But am not sure what to put in for "???"
Thanks - Randy
Hello,
I have Full Text catalog created in SQL Server 2005, when I search the text like "Bolivia's History", it returns all the result matching to that, but if I use "Bolivias History", it does not return anything, I am very new to Full Text Search stuff, any lead how to ignore the special character ("'"), in Full Text Search?
Thanks in Advance,
Manoj
I can select using or with the sql statement
select f.userid, f.friend_userid from friends f where userid = 1 or friend_userid = 1;
now in the output i have to merge the two rows(userid and friend_userid) into one row such that only the rows without 1 are displayed
I m using mysql....
Thanks
Pradyut
India
If I create a website that uses an mdf in App_Data with the connection string:
Server=.\SQLExpress;AttachDbFilename=|DataDirectory|mydbfile.mdf;Database=dbname; Trusted_Connection=Yes;
what do I need to do to run the site in a shared hosting environment? Do I need to copy the contents of my mdf to the main SQL Server engine of my host? Is there a way to use the non-SQLExpress engine of my host and still keep my mdf in my App_Data?
Hi,
I am using Oracle Sql Developer to browse a MySQL database. When I browse table with Columns tab(shows table definitions), some of tables will display an Error Encountered dialog that says: Vendor code 1317. Does anyone know how I can resolve this?
Thanks,
/Z
I have a web site and a web service and I would like to host them somewhere.
I need to use it mostly for testing and so that a some friends who are developing some applications to use the service have access to it. Also the service is using a MS SQL 2008 database.
Could you suggest any good free or cheap web hosting service for this. I would need about 1-2 months of hosting.
A cross join performs a cartesian product on the tuples of the two sets.
SELECT *
FROM Table1
CROSS JOIN Table2
Which circumstances render such an SQL operation particularly useful?
i used to open sdf (sqlCE) files with visual-studio ?? or sql-server ??
i really don't remember.
now i can't open this sdf file
with what program do i need to open it ?
I was wondering if there are any free / open source alternatives to RedGate's Data Generator. I do not care if the tool is script based, GUI based, written in anly language/platform. I should be able to target a SQL Server or MySQL schema and have test data generated for me which gets inserted into db directly or generate scripts for insertion.
I want to start working on a big project. I research about performance issues about LINQ to EF and NHibernate. I want to use one of them as ORM in my project. now my question is that which one of these two ORM can get me better performance in my project? I will use SQL Server 2008 as database and C# as programming language.
If I was going to put my site for the public's use, what are some security issues that I should be worried about?
I know of SQL injections.
What other hacks/injections should I be aware of?
The query is a single select containing a lot of grouping levels and aggragate operations.
With SET ARITHABORT ON is takes less than a second, otherwise it takes several minutes. We have seen this behavior on SQL Server 2000 and 2008.
I would like to find a way to create and populate a database during asp.net setup.
So, what I'm willing to do is:
Create the database during the setup
Populate the database with some initial data (country codes or something like that)
Create the appropriate connection string in the configuration file
I'm using .NET 3.5 and Visual Studio 2005, and the Database is SQL Server 2005.
Thanks in advance.
i don't know whats wrong with this sql query.
SELECT *
FROM main
WHERE key LIKE '%$word%'
its giving results in phpMyAdmin but giving warning while executing it in a php page.
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource
I was browsing around and found this blog post:
http://erikej.blogspot.com/2010/04/version-3-of-exportsqlce-now-available.html
(It is for a great add in if you user SQL Server CE.)
On that post I saw an screen shot of SSMS with images in the results.
How is this done? I have images in my database (PNG files that are serialized via memory stream), but I just see numbers when I select the image column.
I am trying to get my linq query to replicate my t-sql but I am lost.
SELECT *
FROM BaiDetail INNER JOIN
BaiDetailMap ON BaiDetail.DetailText
LIKE '%' + BaiDetailMap.BaiDetailMapSearchText +'%'
This is what I have so far... but no go
from det in Source
from map in Map
where det.DetailText.Contains(map.SearchText)
select new {det, map}
Error Message:
Only arguments that can be evaluated on the client are supported for the String.Contains method.
Hello ,
I would like to query from SQL Server 2000 Database.I have got two tables. They are Purchase and PurchaseDetails. I would like to get product records with Last Purchase ID but I can't query with the following statements.So please help me.
SELECT TOP 100 PERCENT dbo.Purchase.PurchaseID AS LastOfPurchaseID, dbo.PurchaseDetails.ProductID,
MAX(dbo.Purchase.PurchaseDate) AS LastOfPurchaseDate
FROM dbo.Purchase INNER JOIN
dbo.PurchaseDetails ON dbo.Purchase.PurchaseID = dbo.PurchaseDetails.PurchaseID
GROUP BY dbo.PurchaseDetails.ProductID, dbo.Purchase.PurchaseDate,dbo.Purchase.PurchaseID
ORDER BY MAX(dbo.Purchase.PurchaseDate) DESC