Archived Months
January 2003
June 2003
July 2003
August 2003
September 2003
October 2003
November 2003
December 2003
January 2004
February 2004
March 2004
April 2004
May 2004
June 2004
July 2004
August 2004
September 2004
October 2004
November 2004
December 2004
January 2005
February 2005
March 2005
April 2005
May 2005
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
August 2006
September 2006
October 2006
November 2006
December 2006
January 2007
February 2007
March 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
all groups > sql server (alternate) > november 2004 > threads for november 15 - 21, 2004

Filter by week: 1 2 3 4 5

Function to remove accent in string
Posted by jensendarren NO[at]SPAM hotmail.com at 11/21/2004 8:36:37 PM
Hi, Does anyone have a function which replaces accent chars from a string with the non-accented equivalent? For example 'hôpital' should return 'hopital'. Thank you in advance....more >>


Insert Into..Select Problem
Posted by Steve Bishop at 11/21/2004 3:05:18 PM
I have this stored proc that is to look for changes only between 2 tables and inserts the changes into one of my temp tables that I later delete in my DTS flow. I am running into a problem I think becasue in my query I am joining on fields that may not exist yet in one of the tables. Is th...more >>

Domain vs Local
Posted by AHartman at 11/21/2004 12:23:30 PM
What are gotchas for starting Sql & the agent with a Local system account versus a system Domain account. ...more >>

Passing parameters to action stored procedures using ADO, in Access Project
Posted by zlatko at 11/21/2004 11:58:06 AM
There is a form in an Access Project (.adp, Access front end with SQL Server) for entering data into a table for temporary storing. Then, by clicking a botton, several action stored procedures (update, append) should be activated in order to transfer data to other tables. I tried to avoid any ...more >>

Urgent; Incorrect Syntax Near Go Help
Posted by amit_sd01 NO[at]SPAM yahoo.com at 11/21/2004 7:52:48 AM
Hi Experts, i am writting a stored procedure in sql server 7. Its a simple stored procedure It is my first stored procedure. I want insert a record in table if the primary key field user id already does not exists. if it exists SP should pass 0 as output else if insert is successfull it should...more >>

collation problem
Posted by amos NO[at]SPAM cvidya.com at 11/21/2004 7:43:13 AM
hi i have a db with hebrew collation. i now want it to be cyrillic collation. converting the db collation - wont help. i tried exporting data to a blank DB created with cyrillic collation - still, no good. what is the best way of having a DB with a certain collation so no matter the desti...more >>

Dual Xeon or Dual P4 for SQL Server?
Posted by John Dalberg at 11/21/2004 7:14:17 AM
I am planning to build a server to be used as a SQL Server and web server. Right now I can only use a single box for both. I have read some threads were dual processors are having problems with some parallel queries and the suggestions of having sql server use a single CPU. My budget is li...more >>

What is the value of this error?
Posted by tho_pic NO[at]SPAM yahoo.com at 11/20/2004 4:22:37 PM
Today I was asked the following question but I don't know the answer. Could you guys tell me the answer and explain why? CREATE PROC TestProc @I int OUTPUT AS SET @I=1 RAISERROR ('An error',18,50) SET @I=@@ERROR go DECLARE @I int EXEC TestProc1 @I=@I OUTPUT select @I go I d...more >>



Transaction Log Auditing
Posted by imkevinwilson NO[at]SPAM netscape.net at 11/20/2004 2:39:11 PM
Is there a tool that can report transaction log information? Such as reporting what tables/columns were updated, by whom and when, etc....Thanx....more >>

Sql 7
Posted by qplayer NO[at]SPAM hotmail.com at 11/20/2004 12:11:22 PM
Whats the difference between sql 7.0 and sql 2000? I'm learniing sql 7.0 but was wondering if I'm ,wasting my time...more >>

logins
Posted by soalvajavab1 NO[at]SPAM yahoo.com at 11/20/2004 8:16:56 AM
I am confused about windows account, win dimain account, sql login accoun and sql database user account.... can you give me a fresh example to show the exact relationship between them and how they work together?...more >>

Batch insert 10000 rows at a time and commit
Posted by ajayz90 NO[at]SPAM hotmail.com at 11/20/2004 5:29:27 AM
I want to Insert 10000 rows at a time and commit in sql server , Is there a way to do it if the source tables have no id fields ? What would be the most efficient method? Thanks Ajay...more >>

Appropriate Use of READ UNCOMMITTED?
Posted by sherkaner77 NO[at]SPAM yahoo.com at 11/20/2004 12:43:12 AM
I haven't used the READ UNCOMMITTED transaction isolation level before, and I was wondering if this would be an appropriate use: I have an ID table containing ID numbers that are randomly generated and need to be unique. There is a stored procedure that potentially generates thousands of these...more >>

SQL6.5 restore
Posted by AHartman at 11/19/2004 6:54:50 PM
Can you restore a SQL6.5 backup to a Sql2000sp3 ? ...more >>

Dynamic sql - how to use 'if exists' with variable tables..?
Posted by Bane at 11/19/2004 6:25:23 PM
Hi all In the SP below im (trying to) do some dynamic sql. As you can see the table to use is set as a variable and the 'exec' method used to run the sqlstatements. My problem is that the 'if exists' method is not doing what i was hoping it could do. The @presql command returns somewhere bet...more >>

select row values to be column name
Posted by info NO[at]SPAM fotokard.com at 11/19/2004 4:40:17 PM
I am new to sql query and have a question. I would like to display row column values as column names. questions table consisted of question_id, group_id, question response table consisted of response_id, group_id, question_id, answer I would like to display the answer responses under...more >>

Lost deadlocks
Posted by mjw NO[at]SPAM cbord.com at 11/19/2004 3:10:57 PM
We've found deadlocks in the trace file that were not captured by our Powerbuilder application. Some deadlocks are trapped or, at least, reported to the user as a db error, and others are completely silent. We've also seen evidence of strange data that would be explained by unprocessed deadlocks...more >>

Data Access Pages and SQL-Server
Posted by Jeff Magouirk at 11/19/2004 1:35:54 PM
Dear All, I have developed a Data Access Page with Access as a project. It is connected to a SQL-Server database. I try to edit the data in the table and am not able to do so. I might be missing some permissions. I have changed a number. What am I missing? Thanks in advance. Jeff...more >>

Basic Question on Join
Posted by nickgieschen NO[at]SPAM hotmail.com at 11/19/2004 1:25:00 PM
Hi, I'm pretty much a database beginner and have what I think is a basic question: If I have a table which has a 'status' column and I can have say three statuses: "active", "pending", "inactive". Is it better to break these out into a different "Statuses" table? On the one hand it seems...more >>

unique constraint vs unique index in MS SQL 2000
Posted by Kamil at 11/19/2004 1:08:38 PM
Hello What should I use for better perfomance since unique constraint always use index ? Thanks Kamil ...more >>

Moving from Accesss97 to SQL Server 2000
Posted by John McCormack at 11/19/2004 12:09:36 PM
I have developed an Access 97 database that I would like to distribute to a number of staff, but they do not have Access. At the same time I am considering upgrading to SBS 2003 premium edition which comes with SQL Server 2000. 1. If we were to upgrade would it be a very difficult job to recre...more >>

How do I Merge two databases?
Posted by T.Taylor at 11/19/2004 9:34:29 AM
I have two databases with each one on a different server. I can copy both databases to the same server with no problems. But how do I merge them? This is what I came up with so far but how do I do the same process for multiple rows and tables? IF NOT EXISTS (SELECT tmp_DB1.dbo.tb1.key1 F...more >>

Help with SELECT query
Posted by mdi00 NO[at]SPAM hotmail.com at 11/19/2004 3:12:09 AM
My SELECT query returns a data set, one column of which contains a set of values corresponding to the same date. I.e. for each date in column "Date", I have a set of numbers in column "Numbers". However, I am only interested in getting the largest value in column "Numbers" corresponding to each ...more >>

Trigger to populate another table.
Posted by lukerobertcurtis NO[at]SPAM gmail.com at 11/19/2004 3:11:08 AM
Hi. I have a problem I hope someone can help me with. I have a database of events. Each event has a date and a duration (days). What I need to do is to be able to display search for events on some web pages. My problem is that if an event is on say 15 nov 2004 and has a duration of 3 da...more >>

Selecting current time stamp
Posted by sunstarwu NO[at]SPAM yahoo.com at 11/19/2004 1:54:05 AM
Hi, I am having a problem with aquery. Firstly here is a script to create the table and insert some sample data: CREATE TABLE [dbo].[tbltemp999] ( [Machine_Name] [char] (17) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [EventDate] [datetime] NOT NULL , [EventID] [int] NOT NULL ) O...more >>

Errori SQL
Posted by Fr4nc3sc0 at 11/18/2004 8:34:32 PM
Salve a tutti, io ho un problema di questo genere: eseguendo il comando DBCC CHECKDB('DATABASE') il motore sql mi restituisce questi tipi di allarmi: Server: messaggio 8909, livello 16, stato 1, riga 1 Errore di tabella: ID di oggetto 1093578934, ID di indice 0, ID di pagina (1:7). L'ID di pa...more >>

Adding Order by on clustered index
Posted by Tryfon Gavriel at 11/18/2004 3:17:32 PM
Hi all I recently noticed when trying to optimise a major query of a chess website I am the webmaster of, that adding an order by for "gamenumber" which is a clustered index field as in for example "order by timeleft desc, gamenumber desc" actually speeded up the queries and reduced sql server...more >>

add leading zero to date column??
Posted by Myk at 11/18/2004 2:13:52 PM
Hello All, None of the solutions I have found in the archives seem to solve my problem. I have a date column in my tables (stored as a char(10)) which I would like to append a leading zero to for those dates that start with 9 or lower. Any ideas? Thanks, Mike ...more >>

Transaction log error
Posted by Guju at 11/18/2004 1:52:41 PM
Hi all, I am getting below error messages mentioned between dotted lines. --------------------------------- fcb::ZeroFile(): GetOverLappedResult() failed with error 2. The log file for database 'UAT' is full. Back up the transaction log for the database to free up some log space....more >>

Computed column
Posted by bcrao NO[at]SPAM yahoo.com at 11/18/2004 12:58:50 PM
I created a index on a computed column. I did not see any improvement in performance with a join to this column and also my inserts and updates to this table are failing. Any ideas? Chender...more >>

Query Help: JOIN ON CONTAINS with FORMSOF
Posted by Jeffrey A. Hawkins at 11/18/2004 12:50:44 PM
Hi, I have been able to JOIN ON CONTAINS(column, 'whatever'), but can't seem to get the syntax right to join on one field containing a related field. The query below is what I am working with... As written, everything inside the single quotes is interpreted as a literal string. I.e. "FormsOf...more >>

SQL Query Help
Posted by muzamil NO[at]SPAM hotmail.com at 11/18/2004 12:43:05 PM
Table: All columns int -------- Col1 Col2 Col3 1 1 4 1 2 4 1 3 7 2 1 8 2 2 8 2 4 8 3 1 8 3 2 8 3 3 9 Query Requested: ---------------- Declare @valueforCol2 set @valueforCol2...more >>

SQL Server runs out of resources or is it my client application. Handle count = 96k
Posted by morebyuk NO[at]SPAM yahoo.co.uk at 11/18/2004 11:55:31 AM
SServer PC: Win SBS 2003 with 2.6 GHz processor and 1GB RAM SQL Server 2000 v 2000.8.00.76 (sp3) MS Office 2k3 MSJet ms04-014 (latest ost sp8) MDAC v2.8 RTM ADO 2.1 vb6.exe / ADO 2.0 I think this is a SQL Server/ADO problem as I have 2 applications with same problem. My access datab...more >>

Calculating Row Size including blobs
Posted by jesse.wolgamott NO[at]SPAM gmail.com at 11/18/2004 10:30:03 AM
I've seen plenty of posts regarding the estimation of table size, usually in the processing of planning for server storage needs. Well, I've got a different problem. I need to know how much data each of our Customers are using in a Database. (1 SQL DB stores multiple customers). Basically, ...more >>

Select from a date range
Posted by sunstarwu NO[at]SPAM yahoo.com at 11/18/2004 8:56:59 AM
Hi guys, whilst working on a project which I thought was nearly complete I have come across a problem which was some how over seen, which I am hoping one of you guys know how to resovle. Firstly here is the script to create the table and insert some sample data: CREATE TABLE [dbo].[tbl...more >>

Use SQL 2000 for this???
Posted by manning_news NO[at]SPAM hotmail.com at 11/18/2004 7:04:56 AM
The dean of our school requires an annual report from 8 departments every year. There are 23 categories that the dean wants info for. In the past, these departments each created a booklet, sent it to the dean's secretary, who then summarized the booklets, then created another booklet to give t...more >>

Checking for transposed numbers
Posted by xxxyyy22 NO[at]SPAM yahoo.com at 11/18/2004 5:16:26 AM
Does anyone have a UDF or Stored Procedure that checks for transposed numbers in a group?...more >>

consolidate multiple records
Posted by Andrew Chanter at 11/18/2004 3:05:56 AM
I have a table containing multiple records per key. eg: 1 | John Smith 1 | Mary Brown 1 | Julie Grey 2 | Danny Pink 2 | Jill White I need to consolidate this into a single record for each key, eg. 1 | John Smith, Mary Brown, Julie Grey 2 | Danny Pink, Jill White I can achieve this u...more >>

Load SQL 7 database and transaction log backups to SQL 2000
Posted by fungcheung NO[at]SPAM yahoo.com at 11/18/2004 12:30:09 AM
Is it possible to load both the SQL 7 database and transaction log backups to SQL 2000 ? I assume it will perform the upgrade during the load. Thanks, James...more >>

Access .adp :How to INSERT all but KEY violations
Posted by JimJimJimJim at 11/17/2004 5:16:29 PM
I am trying to append records from one table to another in a db running on MSDE, knowing fullwell that some of the data in the source will be duplicates of that in the destination table's pk. What I would like to happen is to have the stored procedure plunk in all records that don't violate the ...more >>

SQL statement for a report...
Posted by The Eeediot at 11/17/2004 5:06:22 PM
Hello, SQL gurus! This message use HTML tables (in case you see a bunch of gobbledy-gook). I need to modify an SQL statement: SELECT DISTINCT Trim(InvtID)+', '+Trim(Descr) AS Item, month, = Sum(QtyShip) AS Qty FROM Sales_View=20 GROUP BY Trim(InvtID)+', '+Trim(Descr), month, CustID=20 H...more >>

Creating Reports based on hierarchical XML file
Posted by xiang_fang NO[at]SPAM yahoo.com at 11/17/2004 4:45:59 PM
Hi, We have XML files (and its XSD) that are dump of our tree-like data structure in memory. These XML files may potentially have unlimited levels of nesting because some elements can contain themselves (recursively defined). We want to build some reports using some third party reporting to...more >>

removing constraints without knowing the constraint name
Posted by Gary at 11/17/2004 3:00:52 PM
I have the need to remove a constraint on a table since I'm trying to alter the datatype of one of the columns. I know I can drop the constraint given the name, but since the name is auto generated (something like DF__WHRPT_ITV__Expor__45F365D3) I need a way to find this constraint name so that ...more >>

SQL Server 2000 - preventing multiple update
Posted by aaj at 11/17/2004 2:37:33 PM
Hi all We had a small problem when an ASP web page had a missing 'where' statement and updated all the records in the table. Luckily we could retrieve all the data from the backups. How do you guys prevent this from happening in your large systems. Is there some teqnique for controlling ...more >>

Default retrieval from table loaded by DTS
Posted by Lyle H. Gray at 11/17/2004 1:08:04 PM
[MS SQL Server 7] We load a table from a text file using Data Transformation Services. The source file is already sorted by primary key order. After the DTS load, the default retrieval order on the target table (select * from targettable) appears to be random. I know that theoretically t...more >>

sql server -- identity problem
Posted by gjo NO[at]SPAM o2.pl at 11/17/2004 5:38:00 AM
MS SQL Server 2000. My case is: I have the table T with primary key calling __recid int without identity property. This table includes a lot of records (about 1000000). I need to convert __recid's data type to IDENTITY. As you know sql sentence: "alter table T alter column __recid int IDENTIT...more >>

EVIL FBI SADISTS should be HUNTED, KIDNAPPED and TORTURED for 3 YRS
Posted by victorn234 NO[at]SPAM 138mail.com at 11/17/2004 3:35:07 AM
Someone emailed and requested me to post it on Usenet newsgroups. Sadistic FBI agents should be tortured the way how FBI sadists and perverts tortured this poor guy (non-muslim) for three years and continue to torture him even after he left america tracking him with implanted transponder ch...more >>

RADiest client for SQL Server?
Posted by Mike MacSween at 11/16/2004 9:51:37 PM
I've got a SQL Server database. Nearly finished. It's going to go on a single non networked machine. One day somebody might get access to it over ADSL (probably TS), but for now it's a single user no lan. The machine will actually be running the MSDE. Windows XP Home. I'm quite happy, for no...more >>

Compare Schema's...XSD
Posted by Shock at 11/16/2004 7:29:00 PM
Hey all, I am currently researching ways to compare databases via an XSD schema. I wrote a small app that creates a dataset from a database and exports that dataset to XSD. This gives me an XSD file with tables and relationships representing the entire database. At this point, I am tr...more >>

inserting ole-object
Posted by Stijn Oude Brunink at 11/16/2004 2:34:39 PM
Hello I want to insert an iostream object into a ms acces db. I use ole-obect as the data type for the specific column. Inserting a new record works fine but somehow the field where the ole-object (iostream) has to be interted stays empty. Is ole-obect a proper data type for an iostream or ...more >>

strange backup transaction log
Posted by Zimmermann Christian at 11/16/2004 11:20:32 AM
hello I make every week on sunday a full backup of my database(mdf =60MB / ldf = 300MB) additional i make daily from monday to saturday(6.00/12.00/18.00) three times a backup of the transaction log now I receive follow model of the backed up transactionfiles : 1.11.2004 6.00 log =130MB ...more >>

SQL 2000 padding char with spaces for a type 4 JDBC driver
Posted by prithpal.roda NO[at]SPAM talk21.com at 11/16/2004 10:45:41 AM
Please help!!! We had a sql server 7 DB, with a char 8 field, in which some of the data was only 7 characters in length. Via a type 4 JDBC driver, we got back a NON space padded String. This server got upgraded to sql server 2000. Now, via the type 4 JDBC driver, we get a String padded fie...more >>

Calculate Weekending date.
Posted by david.paskiet NO[at]SPAM t-mobile.com at 11/16/2004 7:34:46 AM
Can someone help me with this. I need to calculate the week ending date of the first week of the year based upon a year provided by the user. Is there a simpler way other than writing my own UDF?...more >>

Database questions
Posted by newtophp2000 NO[at]SPAM yahoo.com at 11/16/2004 2:31:14 AM
We are negotiating with a vendor and we have a few questions: 1) From a licensing point of view, what is a database? Can we install multiple copies of SQLServer on one box? In that case, would each copy be a different database? 2) Within a single SQL Server installation, I can create multi...more >>

can I export tables so that existing tables in destination database will be modified?
Posted by bennett NO[at]SPAM peacefire.org at 11/16/2004 1:23:02 AM
I'm working on an ASP.Net project where I want to test code on a local machine using a local database as a back-end, and then export it to the production machine where it uses the hosting provider's SQL Server database on the back-end. Is there a way to export tables from one SQL Server databas...more >>

Insert Query on table with identity column
Posted by Dave at 11/15/2004 5:15:30 PM
I cannot insert into my appointments table because the primary key and = identity column, appt_id, cannot be added. What do I have to change in = my SQL statement to add new records into this table? I'm using SQL = Server 2000 BE with Access Data Project FE. tbl_appointment -----------------...more >>

System tables fragmentation
Posted by matt NO[at]SPAM perfectdata.co.nz at 11/15/2004 4:57:31 PM
can you defrag system tables. They appear in my dbcc showcontig report. Some are worse than other but if it where a user table I would defrag it. However the reindex commands doesnt work on system tables.... Any ideas. Thanks Matt....more >>

Using Parameter (@value) for "IN" function list
Posted by daddygiles NO[at]SPAM yahoo.com at 11/15/2004 3:24:44 PM
I am trying to select a group of records based on a parameter value passed to the db from a web page. The value comes in as @Status and has a list of statusID's: (1,2,5,9) I've tried to use "Where table.status IN (Select * from @Status AS ValueList)" And also tried "Where table.status IN (@St...more >>

Error message "String or Binary data would be trunicated", " The statement has been terminated"
Posted by Jeff Magouirk at 11/15/2004 10:22:02 AM
Dear All, I have written an update trigger that should write a message to an audit table When I try to update any field in the table I recieve the following error message - [ODBC Sql Server Driver] [Sql Server] Stirng or Binary data would be trunicated [ODBC Sql Server Driver] [Sql Ser...more >>

How can you optimize duplicated work in views?
Posted by chakachimp NO[at]SPAM yahoo.com at 11/15/2004 12:00:54 AM
This one's kind of hard to explain, so I've opted to post a simplified version of our view that prompted me to ask this question: The question is re-asked after the view... create view MainView ( PrimaryKeyID, SubTotal1, SubTotal2, GrandTotal ) as select t.PrimaryKeyID, ...more >>


DevelopmentNow Blog