I create a query:
Select * from HR_Tsalary where month='3' and year ='2010'
the result is 473 records and I found 2 duplicate record, then I create another query to find duplicate record only:
SELECT Emp_No, COUNT(*) FROM HR_Tsalary
WHERE year = '10' AND month = '3'
GROUP BY Emp_No HAVING COUNT(*) > 1
the result is zero record fro...
Right, keep in mind i need to describe this by abstracting all possible confidential info:
I've been put in charge of a 10-year old transactional system of which the majority business logic is implemented at database level (triggers, stored procedures etc). Win2000 server, MSSQL 2000 Enterprise.
No immediate plans for replacing/updating...
Hello,
I have a table like that
ID ORDER TEAM TIME
IL-1 1 A_Team 11
IL-1 2 A_Team 3
IL-1 3 B_Team 2
IL-1 4 A_Team 1
IL-1 5 A_Team 1
IL-2 1 A_Team 5
IL-2 2 C_Team 3
What I want is grouping the same named teams which are also sequential teams (Which is according t...
We have an Access application front-end connected to a SQL Server 2000 database. We would like to be able to programmatically export the results of some views to whatever format we can (ideally Excel, but CSV / tab delimited is fine). Up until now we've just hit F11, opened up the view, and hit File->Save As, but we're starting to get re...
We are using merge replication in SQL Server 2000. We have a snapshot agent that runs every night that updates the publication snapshot. About six months ago we updated from SQL Server 7.0 to 2000 (that's not a typo). We noticed a sharp decline in conflicts at that time but could not track down the reason. We finally found that the d...
Hello, i have a general "best practice" question regarding building a multi-level shop, which i hope doesn't get marked down/deleted as i personally think it's quite a good question, which some people might class as "subjective".
I am a developer in charge (in most part) of maintaining and evolving a cms system and associated front-end ...
I want to find all column names in all tables in all databases. Is there a query that can do that for me? The database is Microsoft SQL Server 2000.
...
While working with some random sql queries on our databases, we may not want to insert or delete items to some of the database tables by just typing their names by mistake. So how to make them locked to the "editing", to be able to work safe.
Thanks.
...
I'm trying to better understand why one of our database update scripts failed to work properly at a particular customer site, and narrowed it down (I think) to database ownership and roles.
Disclaimer: I'm actually waiting to hear back from the customer's DBA so they can tell us if they upgraded their SQL database recently and so we...
How can I import CSV file data into SQL Server 2000 table? I need to insert data from CSV file to table twice a day. Table has more then 20 fields but I only need to insert value into 6 fields.
...
I want a copy of SQL Server transaction log file for "raw" analysis. What is the safest way to get a copy of that file without shutting down the database and disturbing the existing log/backups/backup schedules and just about everything.
FYI, Its a SQL Server 2000 database server and I can see the log file (its about 4GB in size) and I ...
Hi all,
I am not able to install GP 10.0 in my system, pls somebody help me with the steps how can i install GP 10.0 in my system. I have windows XP service pack 2 OS. Going to work with GP 10.0 with SQL 2000 Database. I will be really appreciate if somebody help me with installation steps of GP 10.0 and SQL 2000. I am really fed up with...
I'm currently in the process of cleaning up a sql server 2000 instance. I found 10 Local Packages that were created 4-5 years ago. In an effort to clean up old processes, I want to delete these packages. My question is, how can I determine if they are still in use. Does the start and end time on the log file suffice? Thanks!
...
What do I need to consider before I switch a bunch of fields from VARCHAR(bignumber) to TEXT?
Aside from performance, and sometime in the far future TEXT will be deprecated, and aside from the fact that it looks like I need to drop and recreate the table to alter the column's data type?
This is for SQL 2000-- I can't do VARCHAR(max) an...
At work we have a number of databases that we need to do the same operations on. I would like to write 1 SP that would loop over operations and set the database at the beginning of the loop (example to follow). I've tried sp_executesql('USE ' + @db_id) but that only sets the DB for the scope of that stored procedure. I don't really wa...
Why does
left(FIELD, replace(nullif(charindex('-', FIELD), 0), null, len(FIELD)))
always return null? The idea behind the query is that if charindex() returns 0, then convert the results into null, then convert the null into the length of the field. So if '-' does not exist, show the whole string. For some reason it makes every row eq...
I need to store a password has in a SQL server 2000 database. The information isn't critical but I really don't want to store the password in clear text. How can I get a unique hash (sha, sha1, md5, etc) in SQL server 2000 as HashBytes isn't available.
I'm not looking for compiled DLL or the ilk, I dont have access to the server, needs ...
How to auto increment an id in SQL Server whenever a new row is inserted in the table?
This id is primary key of the table.
...
I'm trying to do some cryptography for SQL Server 2000, and I know that only SQL 2005+ comes with built-in functionality for doing this natively.
Do you know any open source implementation that I can use for free of RSA-2048 cryptography?
...
This is really confusing me. Here is a snippet of my model:
* SQL Server *
Event
-----
Id (int, PK) NOT NULL
Title (varchar(100)) NULL
LastModified (datetime) NULL
EventDates
----------
Id (int, PK) NOT NULL
StartDate (datetime) NULL
EndDate (datetime) NULL
* C# *
Event
-----
public int Id
public string Title
public DateTime LastM...