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.
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.
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
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 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.
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 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.
I use this mysql statement for concating description which has a length greater than 30..
select if (CHAR_LENGTH(description)>30,CONCAT(SUBSTRING(description,1,30),
'.....'),description) as description from table
How to change this mysql select into sql server select statement?
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?
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 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 want to log in the console or in a file, all the queries that Grails do, to check performance.
I had configured [this][1] without success.
Any idea would help.
[1]: http://www.grails.org/FAQ#Q: How can I turn on logging for hibernate in order to see SQL statements, input parameters and output results?
I would like to understand how exactly does sql count work. Is it a whole table scan that happens or is it some property of the table that is read. However I feel a table scan would be an overhead in case of huge tables with lots of records.