Hello everyone,
I have one database which contains the most recent data, and I want to replicate the database content into some other servers. Dues to non-technical reasons, I can not directly use replicate function or sync function to sync to other SQL Server instances.
Now, I have two solutions, and I want to learn the pros and cons ...
Recently i moved to office 2007. im trying to import excel file to sql server 2000 using import and export data tool ,the tool gave data source as excel 97 - 2000 but while importing xlsx file ,im getting error "Error source Microsoft Jet databse Engine", external table is not in the expected format. Can you tell me how can i import off...
Hi,
I have a rather simple web-service which exposes data from sql server. It will be used to synchronize data between 2 different databases (SQL Server and Lotus Notes). We're in the stage of testing the web-service and poll it with 20 req./min., the first 2 minutes it goes OK, but after the second, we're getting an exception, obviousl...
I exported a table to a server but I can't find the table. Maybe I didn't put the right destination database. How can I find this table if my server has multiple databases, without opening each one of them?
I use MS Sql Server Management Studio 2008.
...
We have Merge (Push) replication set up between the databases in our different offices. Each database carries the complete set of data, so that the users in each office only need to connect to the database server in their office. When users want to go off-site they need to pull a subset of data to a local (on user's laptop) SQL Express...
When I try to run the following statement, an error message is returned:
Server: Msg 208, Level 16, State 1, Line 1
Invalid object name 'vendortofaultypeitemsmap'.
SQL Help indicates this message appears when "an object that does not exist is referenced". This table does exist and returns values if I run *select * from vendortofaulttyp...
Maybe this is just a stupid idea, that's why I toss it in here:
I am creating an application, using one database for base and current data (customers, articles, inventory, open invoices, ...) and one database per year for archive data (old invoices, inventory movement, ...).
There is only one nasty little problem: MSDTC. Most transacti...
I know that in SQL Server, the maximum number of "objects" in a database is a little over 2 billion. Objects contains tables, views, stored procedures, indexes, among other things . I'm not at all worried about going beyond 2 billion objects. However, what I would like to know, is, does SQL Server suffer a performance hit from having a...
I have a SQL Server 2008 query
SELECT TOP 10 *
FROM T
WHERE ...
ORDER BY ...
I'd like to get also the total number of the rows. The obious way is to make a second query
SELECT COUNT(*)
FROM T
WHERE ...
ORDER BY ...
Is there an efficient method?
Thanks
...
Short:
From below sql select I get the cart_id and the value of the maximum valued item in that cart.
select CartItems.cart_id, max(ItemValues.value)
from CartItems inner join ItemValues on CartItems.item_id=ItemValues.item_id
group by CartItems.cart_id
but I also need item_id for that item (ItemValues.item-id).
Long:
Two tables, C...
I frequently get the following error when attempting to execute simple statements against a remote instance of SQL Server 2005. I click execute, the window hangs for several seconds, then I get the error. I click OK, click Execute again, and it runs fine. This happens frequently enough to be very annoying.
Last week I worked exclus...
Is there a way to work on a recordset returned from an exec within another SP? The whole recordset, preferably not using OUTPUT
I.E.
MyStoredProcedure
@var1 int
AS
BEGIN
EXEC anotherSP @var1
-- do something against the recordset returned by anotherSP
END
...
I'm having a problem OUTPUTing a variable in my assembly.
Do I need to add a "out string var1" to the parameter list of the function in C#?
I get an error - something related to var1 not being set...
I tried parameter.Direction = ParameterDirection.Output
I can't find any good examples
Edit:
My assembly SP currently returns a records...
I am trying to run a SSIS package using dtexec
My package is deployed to a folder which has spaces in the path name
This is casuing dtexec to spit out the dummy.
Any ideas?
...
I have two Microsoft SQL 2005 databases setup in a fail over scenario. The application connection strings have the "Failover Partner" specified in the connection string.
When the currently live database fails over to the slave database, there is a small time period that a user can obtain a SqlClient.SqlException with the message "An ex...
I have a beginners question in TSQL.
We imported Excel Sheets into a SQL Server 2008. Too bad these excel files were not formatted the way they should be. We want a phone number to look like this: '012345678', no leading and trailing whitespace and no whitespace within. Even worse sometimes the number is encoded with a prefix '0123-2349...
I am trying to use the ROW_NUMBER function, but I am running into two problems. 1) Because I am ordering the count in descending order, the rowid does not start at 1, it starts at 41 for example. 2) When I try to bring back rowid between 42 and 52, it says rowid is an invalid column. Here is the toned down query with some extra columns ...
I have an application which potentially does thousands of inserts to a SQL Server 2005 database. If an insert fails for any reason (foreign key constraint, field length, etc.) the application is designed to log the insert error and continue.
Each insert is independent of the others so transactions aren't needed for database integrity. H...
I get dates in my dataset in the form "yyyyMMdd" (ie 20080228 means Feb 28, 2008)
I need to convert these to "M/d/yyyy"
Examples:
20080228 = 2/28/2008
20080101 = 1/1/2008
20081001 = 10/1/2008
20081212 = 12/12/2008
what is the correct expression to handle this?
EDIT
The expression that I used (ORDDTE is in the "yyyyMMdd" format and...
So I'm just confused here.
I've got to migrate my database from MySQL to MS SQL Server 2008. I've transferred the data via the "MS SQL Data Wizard" app from SQL Maestros. It took the data+structure from my MySQL database "gk" and copied it into a database "gk" on my MS SQL Express instance.
But when I connect to the MS SQL instance a...