Archived Months
January 2003
March 2003
April 2003
May 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
November 2007
April 2008


all groups > sql server programming > june 2007 > threads for wednesday june 13

Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30

Combining multiple detail field values into single field
Posted by BobRoyAce at 6/13/2007 10:04:36 PM
I am using SQL Server 2005. Let's say that I have a table called Roes, and another table called RoeComments, with a one-to-many relationship. In other words, a single record in Roes can have multiple records in RoeComments. For purposes of this question, let's say that I only care about one fi...more >>

IS there something wrong with this proc?
Posted by Antonio at 6/13/2007 8:40:23 PM
This is really weird but for some reason when i run this nothing happens except for the message saying it was added. would really appreciate someone taking a look at this. Thanks. USE [EventCalendar] GO /****** Object: StoredProcedure [dbo].[sp_EditSingleEvent] Script Date: 06/13/2007...more >>

Dropping a schema
Posted by Pat Moran at 6/13/2007 7:48:00 PM
i have tried to create a procedure CREATE PROCEDURE usr_sql_drop_user @USER nvarchar(255) AS drop schema @USER drop user @USER drop login @USER but Sql server complains Msg 102, Level 15, State 1, Procedure usr_sql_drop_user, Line 4 Incorrect syntax near '@USER'. I cannot se...more >>

Query of Death: Affects SQL 2000 on Itanium
Posted by Hawkins, Charles F. at 6/13/2007 6:46:35 PM
I discovered a Query of Death back in January, 2006. Microsoft still hasn't fixed it yet. I was just able to test it on Itanium, running SQL 2000 SP4. It kills the SQL Server instance by bringing the server to 100% utilization and not letting go. Ever (at least until the server is rebooted or ...more >>

Similar query returns different rows
Posted by Josep at 6/13/2007 6:29:46 PM
Hello! That's a little nightmare. I've been using the NOT IN statement for a long time because I feel it easier to understand in complex queries and now I've found some strange behaivour. In this three sentences I try to list the rows in table [Armadors] that don't match in table [Persones...more >>

Getting Rule Values
Posted by Toyist at 6/13/2007 5:57:35 PM
I am creating simple store and retrieve tables that will be used for ASP.Net development. I am constraining the columns and would like to be able to expose the rule values to the developers (preferably through a stored procedure) The sp would take a parameter of 'table.column' (or table, c...more >>

any reason to not use varchar(max) ?
Posted by John Grandy at 6/13/2007 5:16:35 PM
In SS05 is there any reason not to use varchar(max) for those cols where there is no reason related to data-integrity to bound the col's size ? (e.g. for business reasons might want to bound a telephone number to 10 chars) ...more >>

temp tables not in system catalog?
Posted by Allen_N at 6/13/2007 5:13:01 PM
I'm trying to make a script bulletproof before I morph it into a stored procedure, but I'm having persistent, infuriating problems with the temp tables it builds. Sometimes, the script fails part-way through, so some temp tables are created and some not. So, at the beginning of the script, ...more >>



Adding object to arraylist, object is duplicated?????
Posted by Colette_J at 6/13/2007 5:12:14 PM
I have a public arrsy list object that i populate with objects. The arrylist is declared public. So since thsi array list is global, when a method is called to create a new object its then added to the arraylist. But every time I add an item, the previous item seems to be replaced by the newly...more >>

Planning on going with dynamic SQL, but...
Posted by Ronald S. Cook at 6/13/2007 5:02:05 PM
I've read a few posts on the stored procedure vs dynamic sql debate. I ran a few performance test for myself and it appears to be a wash. Given that, I'm leaning toward dynamic sql mostly because it would mean one fewer place to have things. But, before we go that route we wanted to ask t...more >>

Debugging SQL 2005 SP
Posted by jay_wic NO[at]SPAM yahoo.com at 6/13/2007 3:26:00 PM
I am unable to debug SP in sql 2005, so I red thru the news articles and found out the feature has been move to VS 2005. My qestion is, I have a SBS 2003 premium installation which has the SQL server full installation but I cannot find the "Step Into Stored Procedure" and "Allow SQL CLR Debugg...more >>

Stuffing zeros
Posted by Rob at 6/13/2007 2:39:00 PM
I have a column that contains values such as: EM52312 0056578 0055598 EM54102 EM58925 0058793 What I'd like to do, is to add four zeros to the left and right of these values and replace any instance of a value beginning with 'EM' with zeros as well. Therefore, the above values shou...more >>

Need urgent help on a QUERY
Posted by jsmith at 6/13/2007 2:10:03 PM
Given: SELECT STATE_ID FROM GROUP_STATE STATE_ID ---------------- 10 15 16 17 18 19 20 SELECT GROUP_ID FROM GROUP WHERE GROUP_ID NOT IN (SELECT DISTINCT GROUP_ID FROM GROUP_STATE) GROUP_ID --------------- 1 2 16 5 I need a query that would look like: GROUP_ID ...more >>

How to compare 2 tables
Posted by fniles at 6/13/2007 1:58:18 PM
I have 2 tables and both tables have a column called ID. How can I write a query to compare the 2 tables and see if there is any ID in table 1 that does not exist in table 2 ? Thank you. ...more >>

The name %s was not found in the Views collection.
Posted by Ian Boyd at 6/13/2007 12:31:53 PM
Every time i run the index tuning wizard on a database, or a restored copy, i get the error: [SQL-DMO]The name '[dbo].[transactions]' was not found in the Views collection. If the name is a qualified name, use [] to separate the various parts of the name, and try again. It's been a...more >>

Popup Window
Posted by Frank at 6/13/2007 11:46:36 AM
I am using a program that was written in Delphi, using a MS SQL database. I do not have access to the source code (Delphi). Much, if not all, of the database work is done in procedures, which I do have access to. I have been able to successfully modify some of the behavior of this program to fit ...more >>

The sql transaction sample in MSDN is so weird, only one command inside the whole transaction
Posted by Carol at 6/13/2007 11:45:07 AM
The sql transaction sample is from http://msdn2.microsoft.com/en-us/library/ms188929(SQL.90).aspx DECLARE @TranName VARCHAR(20); SELECT @TranName = 'MyTransaction'; BEGIN TRANSACTION @TranName; USE AdventureWorks; DELETE FROM AdventureWorks.HumanResources.JobCandidate WHERE JobCandidateID ...more >>

Run SQL DTS package from button on web form
Posted by betty NO[at]SPAM systemetricsinc.com at 6/13/2007 9:45:06 AM
I am trying to run a DTS package from a button on a web form. I am using Framework 1.1 and SQL 2000. I have written a procedure to execute the package and run that procedure from the button. The procedure uses: set @sProcCall = 'DTSRun /S' + @ServerName + ' /U' + @AppUsername + ' / P' + @AppP...more >>

Connect as another domain user
Posted by SQL Learner at 6/13/2007 8:16:44 AM
The SQL 2000 server is using integrated security. From my C# application, I want to establish a second connection using network credentials of another user. I know domain, user name, and password of that user. Is it possible in SQL 2000? Is it possible in SQL 2005? TIA ...more >>

use CREATE SCHEMA statement in DDL Trigger
Posted by Sam Bendayan at 6/13/2007 6:53:37 AM
Yes...the error message is clear. I was just wondering if anyone had found any workarounds for this. Thanks, Sam Bendayan DB Architect Ultimate Software sam.bendayan@gmail.com *** Sent via Developersdex http://www.developersdex.com ***...more >>

Q: Object_Name and User_Name functions in SQL Server 6.5
Posted by Richard J at 6/13/2007 6:35:01 AM
Good morning, I am using the following query under both a SQL Server 2000 and SQL Server 2005 environment: select count(*) from sysprotects where object_name(id) = 'Table1' and user_name(uid) = 'Role1' I have tested this query against databases with a compatibil...more >>

Selecting most recent set of data
Posted by MikeSwann at 6/13/2007 3:40:00 AM
Dear All, I am trying to select the most recent set of transactions in our accounting software. The data I have looks something like this: Account Period Value A 200611 21 A 200612 35 A 200701 72* B 200604 98 B 200608 46 B 200703 52* I would like to write a select statement which...more >>

What does passing a table as a parameter really mean?
Posted by Steve Dassin at 6/13/2007 2:58:27 AM
( Also available here: http://beyondsql.blogspot.com/2007/06/dataphor-13-passing-table-as-parameter.html ) A quick peek at what passing a table as a parameter really means? This example uses the D4 language of Dataphor, MS Sql Server 2005, the Orders and OrderDetails tables from the Nor...more >>

sql query problem - no duplicate rows
Posted by mimran81 NO[at]SPAM gmail.com at 6/13/2007 1:22:55 AM
I have coming result like this: RoomID CourseMaterial ----------- ---------------------- 4260 Evaluation form 4260 CD 4290 CD 4342 Diploma from query: select Att.UserRoomID, CM.Description as [Course Material(s)] from WA_Users Ws inner join WA_Attending Att on Att.UserID = Ws....more >>

Very slow performance on datetime field with even an index present
Posted by Arno Brinkman at 6/13/2007 12:00:00 AM
Hi, I'm using MSSQL2K and have troubles getting a query faster. The table where the query is run against has 400.000 records (and grows every day further) with 70 fields. One of those fields is a non-nullable datetime field and there is an index on that field. The maximum number of duplicat...more >>

Can SQL Server 2005 Express handle my website and replace...
Posted by trint at 6/13/2007 12:00:00 AM
I currently have the real deal with SQL Server 2000 and all the Service Packs. However, I am about 75% in on developing a replacement for our old website with using the Express version (Microsoft Visual Web Developer Codename "Orcas" Express Edition CTP) of Microsofts developement software (in ...more >>

using raiserror on sql 2005
Posted by Roy Goldhammer at 6/13/2007 12:00:00 AM
Hello there when i set error event using raiserror function how can i set newline in the string when \n isn't working? ...more >>

read chinese in vfp (using English Version WindowXP)
Posted by Agnes at 6/13/2007 12:00:00 AM
We put the application in the server, and user use English version Window XP , As there is some traditional chinese character in vfp database, I request client's user to change their version of Window XP . However, they repied us "When they use MS Office/Outlook/Word/... and IE, they can ...more >>


DevelopmentNow Blog