Running this:
bcp MyDb.dbo.uvwMyView out "c:\Test.txt" -SMyServer -T -c
I get this error:
SQLState = S1000, NativeError = 0
Error = [Microsoft][SQL Native Client]Unable to resolve column level collations
Searching google finds many possible solutions, none of which work for me or have worked for any of the people they were proposed...
We want to replicate data from one database to several others (on another server). Would it make sense to replicate these tables to a shared database on the other server and have our cross-database queries reference the shared database... or would it make more sense to replicate out to each individual database on the other server? Would ...
In SSIS 2008, the ability to reference other class libraries has been added. Is there anyway to resolve the references to a non-GAC location when deployed to a non-developer environment? For instance, if I add a reference to c:\lib\mylib.dll in an SSIS script task then deploy that package to another machine. Can I simply place mylib.dll ...
I have a table myTable with myGuid (uniqueidentifier), myValues (float), myGroup (integer) and a bunch of other fields which are not important right now. I want to do something as simple as:
SELECT SUM(myValues)
FROM myTable
WHERE myGuid IN (SELECT * FROM ##test)
GROUP BY myGroup
##test is just a temporary table with a single fiel...
I've got a requirement where a user enters a few terms into a search box and clicks "go".
Does anyone have any good resources on how to implement a dynamic search that spans a few database tables?
Thanks,
Mike
...
Hello,
I have a query that I'm not sure how to write. I'm not a SQL expert and it's pretty nasty. I'm hoping someone here can help me with it.
I have a table called "Members" which has a list of user names to my web site. I need to get the list of users that belong to one or more divisions in my company as well as one or more managers....
I have a set of approx 1 million rows (approx rowsize: 1.5kb) that needs to be "cached" so that many different parts of our application can utilize it.
These rows are a derived/denormalized "view" of compiled data from other tables. Generating this data isn't terribly expensive (30-60sec) but is far too slow to generate "on the fly" as...
By using cursor i want to make one virtual table. and after that using function i want to use that virtual table format and pass value of original table and then.. i show.. virtual table.. into output..
...
SELECT * FROM (SELECT ROW_NUMBER()
over
(
ORDER BY
CASE WHEN @SortExpression ='Country_id' THEN Country_id END,
CASE WHEN @SortExpression ='Country_name' THEN Country_name END,
CASE WHEN @SortExpression ='Country_region' THEN Country_region END,
CASE WHEN @SortExpression ='Country_area' T...
Is there an easy way to copy all stored procedures from one database to another? I have SQL Management Studio installed.
...
I am attempting to query a SQL 2008 x64 database from a SQL 2008 x64 database. All attempts have failed, whether using Linked Server or OpenQuery. To create the Linked Server entry I have used the linked server dialog, the script it creates and the sp_AddLinkedServer procedure. The error occurs whether I use Windows Authentication or the...
How to get last page no like stackoverflow.com pagination in Sql server 2005
...
I am having difficulties with a complicated (for me any way) query.
The table I'm querying has 3 colums, ClientID (int Not Null), ProductID (int Not Null) and ExpiryDate (smalldatetime nullable)
Given two client ID's Master and Consolidated I need to perform the following business logic to return a single data set:
Select the Clien...
I am still suffering from retrieving an image from a SQL database. This is my final solution for inserting and retrieving an image from database. Here is all my code:
GUI part:
<div>
<asp:Label ID="lblImage" runat="server" Text="Image"></asp:Label>
<asp:FileUpload ID="imageUpload" runat="server" /> ...
In an ASP.NET WebForms application I would like to allow the end-user to browse selected raw data in an sql-server database.
However, I would like to restrict access for the user to only view some of the data based on the username.
I'm not sure how to do this in a way that is possible for the user to understand, since SQL is not necess...
while retrieving data and log files of Mirror Database(Ex:TestDB) using EnumFiles() of sql dmo seeing following error:
ERROR: Microsoft SQL-DMO (ODBC SQLState: 42000) [Microsoft][ODBC SQL Server Driver][SQL Server]The database "TestDB" cannot be opened. It is acting as a mirror database.
so can anyone please tell me how to retrieve all...
All,
I am trying out a new linked server - I can run this command fine:
SELECT * FROM NextGen4.NGEPMWareHouse.dbo.Network_People
If I try to get fancy (update a table on my local server from the linked server)
UPDATE dbo.Network_People
SET dbo.Network_People.NGTimeStamp = NextGen4.NGEPMWareHouse.dbo.Network_People.[TimeStamp]
WHERE ...
Hi,
I have to migrate data in sqlserver from one table to another. Most of the standalone table were possible with select and insert into sp's.
The issue is in one table from the old database there is a column with a primary key say unit.
Now this unit is divided into two parts in the new database for example 'industry' and 'resource'...
Hi,
I have a C# program that retrieves multiple rows from a DB but currently does them one at a time on the same connection.
Would it be better to write it so that instead of repeatedly running (where blah changes each time):
select data from table where name = 'blah'
To something like:
select name, data from table where name in (...
Our production database needs daily index defragmentation on one of its tables. The table has several indexes and one of them will get to 90% fragmentation each day.
The index is on two date fields ( a start time and an end time).
We do not get this problem on our development database although this obviously has a much lower throughput...