I am trying to learn database on my own; all of your comments are appreciated.
I have the following table.
CREATE TABLE AccountTable
(
AccountId INT IDENTITY(100,1) PRIMARY KEY,
FirstName NVARCHAR(50) NULL,
LastName NVARCHAR(50) NULL,
Street NVARCHAR(50) NULL,
StateId INT REFERENCES STATETABLE(StateId) NOT NULL
)
...
SQL Server Edition: 2008 Enterprise
Visual Studio: 2010 w/ .NET 4.0
SSMS 2008 Addin - Data Scripter project source code on CodePlex references Microsoft.SqlServer.SqlTools.VSIntegration.dll
I have referenced the DLL under
<<Microsoft SQL Server install location>>\100\Tools\Binn\VSShell\Common7\IDE
But here is the oddity.
Microsoft.S...
I want to learn how to combine two db tables which have no fields in common. I've checked UNION but MSDN says :
The following are basic rules for combining the result sets of two queries by using UNION:
The number and the order of the columns must be the same in all queries.
The data types must be compatible.
But I hav...
Hi Guys,
I want to update Top 100 records in sql server . I have a table T1 with fields F1 and F2. T1 has 200 records. I want to update F1 field of Top 100 records.
How can i can update in sql server.
Thanks
Rajesh
...
I need to delete databases whose name start with "In"...
I Tried "Like" but it is throwing syntax errors...
I tried following command but throwing syntax errors for "name"
SELECT 'DROP DATABASE ' + name + ';' from sys.databases where name like 'In%'
...
I want to integrate Open ID, Google and Yahoo login in my site, So please anyone can tell me the process of integration in ASP.NET.
...
I haven't used the HierarchyID much, so I'm a little unsure. If my table has a HierarchyID, how do I perform a cascading delete? (i.e. delete all 'children' when deleting the 'parent')
I assume I would have to use a CTE and HierarchyID functions, but not sure how to go about it...
...
I like to write c# code through which i like to check whether there is a table or not in sqlserver?
can any one give me a sample code for that?
...
Hi,
I'd like to get some suggestions about the following scenario.
I have a WinForms application which connects to a SQL Sever 2005 (Express) database hosted in a server located in the same LAN than the clients. Now I need to provide a web interface for intranet/internet usage. I think that the Intranet part won't be a problem because ...
When I execute a T-SQL query it executes in 15s on sql 2005.
SSRS was working fine until yesterday. I had to crash it after 30min.
I made no changes to anything in SSRS.
Any ideas? Where do I start looking?
...
I have a job which has a stored procedure that copies data from one server to another.But problem is that there are two servers,in one i've to copy data in batch of 50 and other in the batch of 10.So,i need to check ip addresses in that case
...
We currently define a list of constants (mostly these correspond to enumerations we have defined in the business layer) at the top of a stored procedure like so:
DECLARE @COLOR_RED INT = 1
DECLARE @COLOR_GREEN INT = 2
DECLARE @COLOR_BLUE INT = 3
But these often get repeated for many stored procedures so there is a lot of duplication.
...
i want to set the querytimeout fromt he connection string.
not the connection timeout , is it possible?
...
I have 2 Tables .
CategoryMaster(CATEGORY_ID (primaryKey),Category_Name) and
FILE_MASTER (FileId primaryKey,FILE_TITLE,FILE_DESCRIPTION,CATEGORY_ID (refer to Category Id of category master))
Now I want to have an SQL query which will return a resultset with 2 columns : Categories and the number of Files created under the category.
I ...
Is it possible to use user-defined functions (UDFs) in Entity Framework? Would it be possible to use them through stored procedures and then add them to the model? As far as I know it's only possible to use select stored procedures through Function Imports if they return an entity - correct me if I'm wrong ;-)
...
I'm now writing a searching application on C#/ASP.NET.
User inputs a keyword into a textbox, and then my app finds appropriate results from SQL Server through ADO.NET.
I want to implement ability to search using AND/OR keyword in my application.
For example:
Now my users can input a keyword such as "Cisco". Now they want to search ...
I'm very new to SQL Server. I got a task from my boss where it involves SQL Server. He gave me a little introduction about it but I would like to know if there are other ways on how to deal with it.
I have a little background on Access but not that so intensive.
I would like to ask your opinion, where to start if you're dealing with S...
For a web application database, from a security standpoint only, what are arguments counter to the point for an sp only solution where the app db account has no rights to tables and views and only exec on sps?
If someone intercepts the app db account, the surface area exposed to an attack is much less then when tables and views aren't e...
I have a case where using a JOIN or an IN will give me the correct results... Which typically has better performance and why? How much does it depend on what database server you are running? (FYI I am using MSSQL)
Thanks
...
I have to support an outdated CMS, which has some parts written in ASP, some in PHP and uses SQL Server for back end. Virtually anything in that system is written with two supported input languages in mind- Latvian and English. Therefore, it uses windows-1257 encoding in all web pages, that use that CMS, and also all admin pages. In data...