Let's say I have many sql server databases which have exactly the same schema. Is there any place where I can write a stored procedure and apply for all databases? If I create the stored procedure for each database, when needed, I have to update them all.
...
I have uninstalled mysql from my system long ago and i have forgot the passowrd i have set to mysql
now when i tried to install it its asking for the old password to set the new password in MySql sever instance configuration wizard
i am not getting access to mysql command line client.
...
Im an SQL noob. Heres my situation.
I have the following tables.
Customer_table
Customer_ID | Last name | First Name | City_ID | Region_ID | Country_ID
Country_table Country_ID | Country
Region_table Region_ID | Region | Country_ID
City_table City_ID | City | Region_ID | Country_ID
I need to find the number of cus...
Snip..
WHERE (dbo.ProductIngredients.Ing_EffectiveTo =
(SELECT TOP (1) Ing_EffectiveTo
FROM dbo.ProductIngredients AS ProductIngredients_1
WHERE (Ing_Id = dbo.ProductIngredients.Ing_Id)
O...
I am a student this is homework... I have one table with four columns: Accounts(numbers), balances(money), and two for descriptions. I have to get a grand total of the balances... This VIEW shows the sums of the balance column but I need to total the sums, also. Any help pointing me in the right direction will be appreciated.
CREATE V...
Hello everyone,
I am using ASP.Net + .Net 3.5 + VSTS 2008 + IIS 7.0 + C# to develop a web application. I am using WebPartManager, and I find when personlization feature is enabled to true, the web application will connect to SQL Server Express version database automatically.
BTW: I find this by when stop SQL Server Express version serv...
Hello,
I'm new to SQL Server 2008...
I have a C# application where:
the users are authenticated at application level with a login form
after their login the application connects to the DB by using the same SQL Server Account (SQL Server Authentication) for each user
My question is:
Is there any limit on the number of users which c...
I have a composite primary key (Int and DateTime) on one of my tables. When I try to add a new record using LINQ (with the DateTime field set to "AutoGeneratedValue = true", and getdate() as default value on the server), I get the following errors:
The primary key column of type 'DateTime' cannot be generated by the server.
Any ide...
This is a query based on the Northwind Database in MS SQL Server 2005.
First I have to get the average of the UnitPrice from OrderDetails table, and group it by ProductID for that particular column alone and alias it as AveragePrice.
Then I need to find the maximum(AveragePrice) which is nothing but the max of previous column, how can ...
Hello all,
I have an after trigger implemented in SQLCLR assembly. Within it I'd like to know, what columns have been really updated (and their values have been changed).
Unfortunately, SqlContext.TriggerContext.IsUpdatedColumn returns true, even when a column value is still the same. I guess, it's just because an SQL query, prepared b...
Can anyone point me towards a sorting algorithm in javascript that would sort the same way SQL Server does (for nvarchar/unicode columns)?
For reference, my previous question about this behavior can be found here: http://stackoverflow.com/questions/3213717/sql-server-2008-different-sort-orders-on-varchar-vs-nvarchar-values
Rather than ...
I am trying to create a "Task" schema in my database. One field is "blockedBy" which represents another Task that is blocking this current task.
I am new to SQL Server and databases in general. How can I create the table properly? It seems like the only valid options are numbers or text.
Should I just store the ID number of the other ...
I'm on a project where I was asked to take a quick peek at some reporting SQL (in a SQL Server 2K5 environment) and was surprised at what I found: 4 to 5 levels of subquerys, distinct clauses, unions, and NoLock hints (which were needed because the SQL was running so long it was blocking standard processing) - all in the same set!.
Beca...
Here is the question:
+--------------+
Ships |
+--------------+
Duke of north |
---------------+
Prince of Wales|
---------------+
Baltic |
---------------+
I need to replace all characters between the first and the last spaces (excluding these spaces) by symbols of an asterisk (*). The number of asterisks must be eq...
Will Mssql be even fast when I query on a view opposed to one query?
example
When I have this view:
create view ViewInvoicesWithCustomersName
Select * from Invoices left join Customer on Customer.ID=Invoices.CustomerID
What will be faster or will it be even fast?
a) select * from ViewInvoicesWithCustomersName where customerName="B...
I have written an update trigger, that does an update that could potentially call itself (which is the behavior I want).
Unfortunately, The trigger does not call itself, and I cant see why. This trigger is simply changing a value of any child records (based on a Parent key), and then I expect on that child being updated the trigger sho...
I am trying to setup a merge replication from SQL Server 2005 to SQL Compact 3.5 sp2. My environment:
- Server: Windows 2008 R2 64bit
- SQL Server 2005 installed on server
- IIS 7 installed on same server with IIS6 compatibility components installed
- SQL Server Compact 3.5 SP2 Server Tools installed on server
I create the publication ...
Hello Everyone!
I've got confused at the moment.
I've got one database to developed for MLM (Multi level marketing) company. so, there's one Members database.. each member have unique ID called membercode.. and all members can members under them.. can make 2 members down to 1 member.. all members are added in same table named "tbMembers...
I have a standard php app that uses SQL Server as the back-end database. There is a serious delay in response for each page I access. This is my development server, so its not an issue with the live setup, but it is really annoying for working on the system.
I have a 5 - 8 second delay on each page.
I am running SqlServer 2000 Develop...
DECLARE @xVar XML
SET @xVar =
'<book genre="security" publicationdate="2002" ISBN="0-7356-1588-2">
<title>Writing Secure Code</title>
<author>
<firstname>Michael</firstname>
<lastname>Howard</lastname>
<age>25</age>
<birthday>2010-05-17T00:00:00</birthday>
</author>
<author>
<firstname></first...