SQL Server 2000. Single table has a list of users that includes a unique user ID and a non-unique user name.
I want to search the table and list out any users that share the same non-unique user name. For example, my table looks like this:
ID User Name Name
== ========= ====
0 parker Peter Parker
1 parker Mary...
is it going to be faster if instead of doing
select * from users where id = 1
or
delete from users where id = 1
or
select count(*) from users
I would create a SP for it ?
...
Hi folks.
In SQL I (sadly) often have to use "LIKE" conditions due to databases that violate nearly every rule of normalization. I can't change that right now. But that's irrelevant to the question.
Further, I often use conditions like WHERE something in (1,1,2,3,5,8,13,21) for better readability and flexibility of my SQL statements.
...
Hi,
I have this query that (stripped right down) goes something like this :
SELECT
[Person_PrimaryContact].[LegalName],
[Person_Manager].[LegalName],
[Person_Owner].[LegalName],
[Person_ProspectOwner].[LegalName],
[Person_ProspectBDM].[LegalName],
[Person_ProspectFE].[LegalName],
[Person_Signatory].[LegalNa...
Is it possible to grant the datareader privileges to a SQL Server Database Role rather than a User?
...
Does anyone know of a way to consume RSS in MS SQL?
...
I was playing with the Stack Exchange Data Explorer and ran this query:
http://odata.stackexchange.com/stackoverflow/q/2828/rising-stars-top-50-users-ordered-on-rep-per-day
Notice down in the results, rows 11 and 12 have the same value and so are mis-numbered, even though the row_number() function takes the same order by parameter as th...
Hello,
I'm having some troubles with updating linq to sql entities.
For some reason, I can update every single field of my item entity besides name.
Here are two simple tests I wrote:
[TestMethod]
public void TestUpdateName( ) {
using ( var context = new SimoneDataContext( ) ) {
Item item = context...
Hi,
I am trying to send database mail when error occurs inside the transaction.My setup for dbo.sp_send_dbmail is correct , when I execute the proc I do get an email within 1 min.
However when I try to use dbo.sp_send_dbmail inside another proc within transactions than I do not get the email. Sql server does show in the result window ...
I'm starting a conversion of a system from MS SQL Server to Postgres. I have the table structures converted, and I use "bcp" to get the data out of SQL Server.
ERROR: invalid byte sequence for encoding "UTF8": 0x80
HINT: This error can also happen if the byte sequence does not match the encoding expected by the server, which is con...
I am getting the following error message with SQL Server 2005
Msg 120, Level 15, State 1, Procedure usp_AttributeActivitiesForDateRange, Line 18
The select list for the INSERT statement contains fewer items than the insert list. The number of SELECT values must match the number of INSERT columns.
I have copy and pasted the select...
Is there a way to programmatically determine if a SQL Server backup is currently being performd on a particular database?
We have automated database backup scripts for both data and log files, where the databases are backed up nightly and log files are backed up every 15 minutes, 24 hours a day. However, we think that the log file back...
Can Instead Of triggers co-exist with regular triggers? If so, are there any potential issues we should be aware of?
...
So maybe someone can point me in the right direction of what is causing this error? I've been fighting with this for a couple of hours and searching the web, and I can't figure out what I'm doing wrong here. It's included as part of a stored procedure, I don't know if that matters, if it does I can include that as well. Tables and fie...
I know how to accomplish my task with .NET, but I wanted to do this just in SQL.
I need to loop through all of the rows where the primary key is somewhat arbitrary. It can be a number or a series of letters, and probably any number of unusual things.
I know I could do something like this...
DECLARE @numRows INT
SET @numRows = (SELECT ...
The snapshot says is it all - I used to be able to attach a database, but after i detached today then tried to attach, i kept getting this error:
http://img197.imageshack.us/img197/2574/attacht.jpg
...
Hey,
I know this is bit of a strange one but if anyone had any help that would be greatly appreciated.
The scenario is that we have a production database at a remote site and a developer database in our local office. Developers make changes directly to the developer db and as part of the deployment process a C# application runs and pro...
Is PDO for SQL Server support query contain Link Server ? I try using mssql_connect but it didn't work. I have try PDO but it alwas return error on query() method.
...
I need to make a questionary(test) from users then write their answers in a database, I want to make a test on a web page. Please, if somebody know please help me.
...
is there any method to get data from excel to sql ? i think that we can do without any writing C#codes. For example : select * from MyExcellFile.xls.Sheet1. Or may be any wizard in sql?
...