Which of the following three options would you choose for a column name in a SQL Server table, and why?
YearToDateWages
YTDWages
YtdWages
Follow up:
SSN
Ssn
SocialSecurityNumber
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?
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.
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..
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?
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'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?
Today was released SQL Server 2008 R2.
Was trying to find what is new (from the developer perspective), but the MS sites has all the PR blah, blah, blah.
There is something new to be aware?
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?
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.
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 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.
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.
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.
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
For example,
the start date = '20100530' and
the end date = '20100602'
How can I write a SQL to display the below result?
month: may, 2 days
month: June, 2 days
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?
Hi I am trying to make a simple search form that uses a startTime and endTime to specify a time range. The db has a datetime field time that is compared against.
So far when i try to use params[:startTime] in the controller I get an array of values which wont work with :conditions = ['time < ?', params[:endTime]]
Is there a simple solution to parse the form's datetime to SQL datetime?
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?