Hello,
I've a SQL statement that returns a xml result, for a serialized object.I want to add a attribute to an element, that reflects the type of the object "xsi:type=table" but i don't know how?
We have developers some developers who are developing against a SQL Server 2005 database, while others are using 2008.
We just discovered that generating the edmx against a 2008 database set the ProviderManifestToken to 2008, which means some queries won't work against a 2005 database.
While this is a known issue, is there any way to set this value at run time, based on a config file?
Hi,
I have an SQL database table, I want to find everything in a table where the 'Room' says 'DISPOSED', Insert 'DISPOSED' into the 'Status' field and then delete the entry in 'Room'.
Basically moving the entry from one field to another (if the 'Room' field has 'DISPOSED' in it)
Hope this makes sense.
Thanks for any help.
I am working to make a basic file database, but I couldnt find the true codes. Can anyone help me to save an exe file to sql database after read, download and use when I need it? With Delphi
Is there a clean way of cloning a record in SQL that has an index(auto increment). I want to clone all the fields except the index. I currently have to enumerate every field, and use that in an insert select, and I would rather not explicitly list all of the fields, as they may change over time.
Hi Friends,
Could anybody help me by giving some good websites that are describing about T-SQL commands. I am a new guy in this field. thanks in advance..
In Plone I have a Z SQL methood:
SELECT [aapp_qtitle]
,[aapp_mtitle]
,[aapp_sdate]
,[aapp_duration]
FROM [AAPP].[dbo].[M_PageBodyElement] where [aapp_id]=<dtml-sqlvar aapp_id type=int>
How can I set the value of aapp_id in my Plone page code?
I'm using LINQ2SQL and I want to compare two tables and select all rows that are missing from one tables (based upon one of the column values).
In standard SQL I would write this as:
SELECT
FirstName,
LastName,
RefId,
Email
FROM
Users_ActiveDirectory AS ADU
WHERE
NOT EXISTS
(
SELECT
U.RefId
FROM
Users AS U
WHERE
U.RefID = ADU.RefId
)
However I'm not sure how to achieve the same result using LINQ2SQL?
Hello,
We have an .NET client app working against SQL Server 2005 (clustered), do I need to do something special in the client app to make it cluster aware?
Thanks.
I have table and I want to swap the values from two rows. I have the rows IDs of the two rows.
Is there any query to do that? Here is an example. Before the query I have this:
row1 : 1,2,3
row2 : 5,6,7
After the swap I want this:
row1 : 5,6,7
row2 : 1,2,3
I don't want write it in .NET code because I think an SQL query is easier than that.
Using Linq to SQL:
if(!parentlist.childlist.Contains(row1))
parentlist.childlist.Add(row1);
else
How do I update the required childlist row with row1? Each row of the child list has a unique id.
parentlist implements IEnumerable and childlist is IList.
I have a very simple INSERT statement being executed from a PHP script running on a Linux Apache web server. I can run the query fine from within SQL Management Studio and it normally runs fine from PHP as well. However, every once in awhile I get an error message from my PHP script that the query failed and the mssql_get_last_message() function returns 'The statement has been terminated'.
What sources can cause this message to be returned from MSSQL?
Hi,
I have a database (SQL server express 2008) which has a column that is defined as text. When we try to store some text which is in chinese, it is not saved. I read that the field should be ntext. I will now have to a conversion to my table to create the column as ntext.
Would I have to do anything with the collation of the database which is set to Latin?
JD
I've been looking into SQL recently and exploring a bit. in regards to Temp Tables I have discovered 3 different temp table types:
1) CREATE TABLE #TempTable
2) DECLARE TABLE @TempTable
3) SELECT * FROM (SELECT * FROM Customers) AS TempTable
Now I understand the scope behind the #TempTable and the @TempTable types, but what about the derived table as in example 3? Where does this derived table get stored? and if it is declared in 1 transaction, can a 2nd transaction access it, or is the scoping of Derived Tables that same as example 1 and 2?
i've read a lot about ORM but wondering if there are side by side comparison examples between an ORM like doctrine and SQL so that you could see what is more easier to maintain?
couldn't find such comparisons in google.
Convention has it that table names should be the singular of the entity that they store attributes of.
I dislike any T-SQL that requires square brackets around names, but I have renamed a Users table to the singular, forever sentencing those using the table to sometimes have to use brackets.
My gut feel is that it is more correct to stay with the singular, but my gut feel is also that brackets indicate undesirables like column names with spaces in them etc.
Should I stay, or should I go?
Hi
Is there any way to massively alter primary keys(uid) to all tables with no primary primary keys in sql server database ? I have a lot of tables and most of them don not have primary keys.
Thanks in advance.
Good Morning,
I have connected to my SQL Server 2005 - and have managed to list all of the databases on that server. Now I would like to run a check on each database to see if I have permission to view that database..
How would I go about this?
Many Thanks,
Joel
Hi
i try to add persistance to my workflow using sql service persistance and all i know is how to add Persistence Service to the Workflow Runtime using code in the host app but what if i have the workflow as web service how can i add persistance..???
Thanks