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 > october 2007 > threads for friday october 5

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 31

HOW TO REMOVE THE USELESS CONNECTION IN DTS PACKAGE (2000)
Posted by weileogao NO[at]SPAM gmail.com at 10/5/2007 7:06:09 PM
In my DTS package there are some useless connections, but I can not find from where I can remove them. Is it the bug in SQL server 2000 DTS? Wei ...more >>


Database Script Does Not Account for Dependencies
Posted by Charles Law at 10/5/2007 6:55:22 PM
I don't know if I have missed something here, but I blindly thought that if I used SSMS to script my database, I could run the script on a new instance and get a database out of it. The script fails, and I get an error saying that a stored procedure requires an object that doesn't exist. Th...more >>

PIVOT Question ...... need sum of the resultant pivot rows
Posted by sloan at 10/5/2007 2:55:52 PM
I have this Northwind generic example below. SELECT c.companyName, [1] as [Nancy], [2] as [Andrew], [3] as [Janet], [4] as [Margaret], [5] as [Steven], [6] as [Michael], [7] as [Robert], [8] as [Laura], [9] as [Anne] FROM (SELECT customerID,employeeID FROM Orders) ...more >>

Crosstab; Sum() or Group BY
Posted by kw_uh97 at 10/5/2007 2:39:00 PM
Hello All I have a query that I can not get the exact results that I want, here is the statement: I am trying to sum all the different C1 categories. SELECT C1, (SELECT ISNULL(SUM(C2), 0) FROM aviw_HES_LeadingIndicatorWithActualAndGoal AS B WHERE C1 = A.C1 AND v.Period >= DATEADD(DA...more >>

how can i query same table in different databases
Posted by TG at 10/5/2007 11:49:00 AM
i have 20 databases with all same tables in them. I need to find a name across the diff databases. e.g select * from db1 where name like 'Richard%' but for all the databases. I appreciate your help! Tammy ...more >>

List all the tables and primary keys
Posted by Aamir Mahmood at 10/5/2007 11:41:09 AM
Hi all, I want to list all the tables and thier primary keys as a result of query. The result may look like this: Table1 PKCol1 Table1 PKCol2 Table2 PKCol1 Table3 PKCol1 Could someone help me in writing this query? Thanks. AM ...more >>

Select help needed
Posted by vovan at 10/5/2007 11:37:35 AM
I have 2 tables in SQL 2000: CREATE TABLE [dbo].[Client] ( [ClientID] [int] IDENTITY (1, 1) NOT NULL , [ClientName] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [EnrollDate] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [CancelDate] [varchar] (10) COLLATE SQL_L...more >>

using a varable as a column select
Posted by Matt at 10/5/2007 10:39:00 AM
Basically what I am trying to do is to set a varable based on the day of the month then populate a column with same name as the varable. In other words I have a table with columns 1-31 and I want todays data to go into the apporpriate column without having to write the script 31 times. For...more >>



need tsql help, please
Posted by light_wt at 10/5/2007 10:24:02 AM
I have an interesting table... It has 3 columns: Child, Parent, IsNaturalParent joe , Ken, Yes pete , Ken, Yes joe , Mit, N joe , Jil, N pete , Suz, N So, Ken is the natural parent of the child joe. Ken is also the natural parent of child pete. Mit and joe ...more >>

Help with Join Statement
Posted by Hrocks at 10/5/2007 10:21:01 AM
I am doing a select with a join and unfortunately the tables im selecting against dont have primary keys to do the field matching, and the on statement i use resolves to multiple values. Is there a way to have the on statement use only the first value it finds? select b.service_categoriz...more >>

Changing the Order of the Columns within a Table
Posted by lcerni at 10/5/2007 9:31:01 AM
Yes, I know the order doesn't matter. However, I have a developer and an upper management person who want it and what I tell them they don't want to hear. I am on SQL Server 2005, SP 2. With regards to changing the order of the columns... 1) Right click on table (such as orders) 2) Cl...more >>

Newbie needs help on best how-to, step-by-step 'book' for C# 2.0 ADO.NET 2.0 C# databases--BUT USING THE WIZARD!
Posted by raylopez99 at 10/5/2007 7:45:15 AM
I need help on selecting a 'book' (online or in paper) on C# ADO.NET 2.0 C# databases. THe reason: otherwise I'll be bombarding this NG with my trivial to answer questions! (one of them, btw, is why I cannot, even when I follow as close as possible an example from an old ADO .NET 1.1 book, s...more >>

CLR (VS2005) assemblies
Posted by Carlos Sosa Albert at 10/5/2007 7:43:04 AM
Hi guys, I've one (probably stupid) question: If I want to move some databases with included CLR assemblies, do I have to get anything else besides the myDatabase.mdf? I mean, the assembly is _INSIDE_ the DB, right? It doesn't have any external dll... Thanks a lot!...more >>

TSQL question
Posted by martin NO[at]SPAM knotek.info at 10/5/2007 7:26:13 AM
Hi, Knows anybody solution for this problem: http://blog.vyvojar.cz/dotnet/archive/2007/10/05/226475.aspx Thx a lot ...more >>

When using the same name for an alias as for a column in a table
Posted by Curious at 10/5/2007 7:08:41 AM
When I run the query: SELECT r.RecipientID, CASE WHEN ( pri.ReceiptTime IS NOT NULL AND pri.ReceiptTime <= GetDate() ) THEN 'Scanned' WHEN ( pri.ReceiptTime IS NULL ) THEN 'Printed' END AS 'Status' FROM Recipient r INNER JOIN DistributionCommonInstance dci ON r.Distr...more >>

Getting Rid of Extra Log file
Posted by Zorpiedoman at 10/5/2007 6:10:01 AM
A couple of years ago, we got in a panic where a transaction log had filled up the hard drive. In order to get the server back up immediately (no time for backup/shrink) we simply added an additional transaction log onto another drive, then took care of the situation correctly. I am DYING to...more >>

Stored proc that takes 10+mins blocks other queries
Posted by samh at 10/5/2007 5:41:19 AM
Hi, I have a stored proc that takes in-excess of 10mins. It's generating report data and is as efficient as can be (I think!) It's kicked off through an ASP.net page using another thread. On completion, it emails the user to let them know it's finished. This works perfectly however... As...more >>

Dynamic Update stored procedure??
Posted by tvin at 10/5/2007 2:07:16 AM
Hi everyone, i have a problem with Update stored procedure, this is what i wrote: ALTER PROCEDURE [dbo].[spTableUpdate] (@invoiceID int,@AlljewelleryID varchar) AS SET NOCOUNT ON; DECLARE @SQLSTR VARCHAR(8000) SET @SQLSTR = 'UPDATE Jewelleries SET ' SET @SQLSTR = @SQLSTR + 'invoiceIDz='...more >>

changing a format of a money value to only two decimals
Posted by Aussie Rules at 10/5/2007 1:01:12 AM
Hi, I have a money value in the table that when selected has 4 decimal points. I am only wanting to deal with the dollar values, and would like to display the value as 99,999,999 so that it has comma's and no decimal values at all. How can I do this in the SQL statement ? Thanks ...more >>

Replication on SQL Server 2000
Posted by gancy26 NO[at]SPAM gmail.com at 10/5/2007 12:32:32 AM
Hello, I am setting up a replication between two SQL Server 2000 instances. One is production instance and the other is mirror instance. I am choosing transactional replication. The question is between creating a initial snapshot of production instance and applying the snapshot (by subs...more >>

Transact SQL Books
Posted by Dooza at 10/5/2007 12:00:00 AM
Hi there, I have been developing websites along side SQL 2000 for 7 years. I am still a beginner, and have Sams Teach Yourself SQL in 10 Minutes (Second Edition) but am looking to go up to the next level, and would like some advice on which book to buy. Two that I have in mind are: The ...more >>

bug in exception handling (try/catch)?
Posted by Bjorn Jensen at 10/5/2007 12:00:00 AM
Hello! begin try -- insert ... select * from nonexistingtableorfunction; end try begin catch print 'catch me if you can'; -- line will not be printed end catch; begin try exec doNotExistingprocedure; end try begin catch print 'this line is printed...more >>

T-SQL equvialent to PL/SQL Number
Posted by Dahab at 10/5/2007 12:00:00 AM
Hi, Anyone knows what datatype to use with T-SQL that is equvivalent to PL/SQL Number. ( Number without precision and scale ). D. ...more >>

quick question, DATEPART function
Posted by luna at 10/5/2007 12:00:00 AM
is it possible to return a date in the format "1st March" if the date was stored as 01/03/2007 ? cheers ...more >>

select & insert *SP function.
Posted by Agnes at 10/5/2007 12:00:00 AM
In SP, i would like to "check the record to see whether prefix" ABC" doesn't exist or not" Parameter @prefix if not exist insert myNumber(prefix, number) values ("ABC",1000) if exist update myNumber set number = number+1 where prefix ="ABC" How should I write it in SP ?? Thanks a lo...more >>


DevelopmentNow Blog