Hi All
I want to synchronize two databases (DB1 and DB2) present in same instance.
Lets say if i create a table or make any changes to a existing table (e.g. altering the structure) in one database DB1, those should be reflected on the other database DB2
Please help
Savitha
...
Is there any solution for bulk delete in SQL Server?
I can't use TRUNCATE because I want to use WHERE for limiting the rows in action.
Is there anything like Bulk Copy (bcp) for delete data?
...
hi
i have table that contain A text field [nvarchar(10)]
how to convert this field to date ?
when i try to change in the field in the design mode - i get this:
Unable to modify table.
Conversion failed when converting date and/or time from character string.
is there any query that i can run to do it ?
thank's in advance
...
hi
i have this Ttime as nvarchar(10): "09:52:48" and i have TmpTime as date
and i try to convert like this: "UPDATE MEN SET TmpTime = CONVERT(DATETIME, Ttime ,108 )"
and i get in TmpTime this: "1900-01-01"
why ?
thank's in advance
...
hi
How can I format the following datetime values:
2010-01-21 00:00:00.000 - as - 21/01/2010
and
1900-01-01 09:09:18.000 - as - 09:09:18
...
This is more an annoyance than a real problem, but it would be great if someone had a trick to get it to work.
Let's say I have a .Sql file, MyScript.Sql. If I go to the file location in Windows Explorer and double click it, it opens SSMS. Good, that's what I want. However if I double click on that file again (or a different .sql file)...
Hi there,
This is my first question so bear with me, i will also attempt to answer one somewhere if i can as payment, though not sure my skills are up to it yet.
I have a stored procedure in SQL 2008 that at the moment executes with a result of about 600 odd rows, it has unions within it and a user defined function used multiple times....
In a scenario where I have a table like so:
int id (PK)
int staff_id
int skill_id
bit mainskill
I want to select only ONE record for each staff member (represented by staff_id) listing their main skill as represented by a (1) in mainskill. If no main skill is present, I want to return any of the skill records for that staff member. Fo...
I am using SQL Server Management Studio running on my local machine.
I can log on to a remote box (database engine) and use the
Studio to create a database backup which is saved to a drive on the remote box.
How do I get it to save the backup to a drive on my local machine?
...
I need to write some code for renaming a column in SQL Server 2008.
When scripting that in Management Studio I got a double renaming :
NAME1 ==> TEMPNAME ==> NAME2
BEGIN TRANSACTION
GO
EXECUTE sp_rename N'dbo.Table_1.columFirstName', N'Tmp_columSecondName_2', 'COLUMN'
GO
EXECUTE sp_rename N'dbo.Table_1.Tmp_columSecondName_2', N'colum...
Background
I am in the process of creating an application (referred to as MyApp) which must read data out from a SQL Server database handled by Navision. Navision users should to be able to use my application, without modifying permissions in the database.
Navision's handling of permissions seems to be on the application layer. It perf...
I've have this strange problem when adding a column to an existing table.
The existing table looks like :
CREATE TABLE [BinaryAssets].[BinaryAssets](
[BinaryAssetId] [int] IDENTITY(1,1) NOT NULL,
[BinaryAssetStructureId] [int] NOT NULL,
[Name] [nvarchar](max) NOT NULL,
[Created_By] [int] NOT NULL,
[Created_On] [bigint] NOT NULL,
...
I have a simple question:
Scenario:
Whose Perfomance is better ?
1)
DROP INDEX -->
TRUNCATE TABLE -->
AND THEN FILLUP DATA -->
AND THEN CREATE INDEX
2)
DROP TABLE -->
CREATE TABLE -->
FILLUP DATA-->
CREATE INDEX
I am using a table with millinos of recods. Which of these queries would suit my needs best?
...
I'm running several Maintenance Plans on my SQL Server 2008 SP1 Standard installation. I'm running SQL Server Management Studio on both my development machine and a copy of it on the server. On either box, if I try and modify any of the existing Maintenance Plans or select "New Maintenance Plan...", nothing happens.
The only solution th...
What are the advantages and disadvantages of using the nvarchar(max) vs. NText data types in SQL Server? I don't need backward compatibility, so it is fine that nvarchar(max) isn't supported in older SQL Server releases.
Edit: Apparently the question also applies to TEXT and IMAGE vs. varchar(max) and varbinary(max), for those searching...
It's been a long time since I've had to install SQL Server. I'm doing it for a source control system called Plastic SCM on my system.
I'm about to finish the wizard asking me a plethora of questions, and I'm at the Service Accounts tab under Server Configuration, it's asking me if I want to use NT AUTHORITY\NETWORK SERVICE or NT AUTHOR...
I'm trying to create a mining model for forecasting against some DW data. I'm using SSIS for my ETL, and trying to use the Data Mining Model Training destination.
Unfortunately I'm receiving an error whenever the column I'm trying to predict is numeric or decimal format. I don't get the error when I create the model by hand in SSMS, a...
I have a stored procedure that takes an int for the desired month and year as parameters. It uses these to compare some datetime values from the tables I'm pulling from. I need to conver them into DateTime values. I'm trying to do something like this:
CONVERT(DATETIME, CONVERT(varchar(4), @year) + '-' + Convert(varchar(2),@month) + '-01...
I am trying to get SQL server CE 2.0 RDA that was working on IIS6 (Server 2003) and Sql Server 2000 moved to a Windows 2008 server with IIS and SQL server 2008.
Is this something that is possible? It seems that there is no fundamental reason that it would not. The target database is not changed since the migration.
My first problem i...
Hi guys, I have a bit of an issue, and to be honest I don't think there's an answer, but I'll give it a try anyway.
So I have two databases [A]->Company and [B]->Product. Both databases have a Country table which is then linked to other tables in each individual database. The problem is that the data between the two Country tables is a ...