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 > march 2005 > threads for saturday march 12

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

SHOWPLAN_TEXT
Posted by kevin at 3/12/2005 7:19:48 PM
Hi guys, I want to create store procedure called "GetQueryPlan", CREATE PROCEDURE GetQueryPlan @Enabled INT=0 AS IF @Enabled=1 exec master.dbo.sp_executesql N'SET SHOWPLAN_TEXT ON ' ELSE exec master.dbo.sp_executesql N'SET SHOWPLAN_TEXT OFF' Howev...more >>


Need help with complex select
Posted by dw at 3/12/2005 5:47:14 PM
Hello, all. I have a student voting application on SQL Server 2000. Once everyone has finished voting, I need to display the results broken into the various categories (offices) and subcategories (sophomore, junior, ...). Here's the table that holds the votes, CREATE TABLE [Votes] ( [voterID...more >>

Complex UPDATE
Posted by Stephen Howe at 3/12/2005 5:11:11 PM
Given the 2 tables Sponsor and SponsorEvent with SponsorID on SponsorEvent as a FK >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> CREATE TABLE [dbo].[Sponsor] ( [SponsorID] [int] NOT NULL , [SponsorCode] [char] (15) NOT NULL , [BrandID] [int] NOT NULL , [FirstDate] [int] NOT NULL ) ON [PRIMA...more >>

Calculating Holidays
Posted by Michael C# at 3/12/2005 2:19:35 PM
Hi all, I want to calculate holidays for the next 10 years and store them in a table. Unfortunately a lot of holidays are defined as "the <nth> day of <Month>." Has anyone done this already, or can you point me to a website that describes how to do this before I re-invent the wheel? Th...more >>

money and accuracy
Posted by Keith G Hicks at 3/12/2005 2:16:00 PM
What's the best way to avoid the problem of being off by a cent or 2 in money calculations due to internal floating point rounding? Does using the "money" datatype solve this alone? Do you need to use all "integer" data types insetad and handle displaying the data appropriately manually? I don't...more >>

READTEXT error
Posted by Rlane at 3/12/2005 1:31:01 PM
I can't figure out I continually get a msg 7124 error using READTEXT. The script: DECLARE @TextfieldPtr varbinary(16) DECLARE @CommentsBytes int SELECT @TextfieldPtr = TEXTPTR(TextComments) FROM Comments WHERE CommentId = 25 SELECT @CommentsBytes = DATALENGTH(TextComments) FROM Comme...more >>

Best Advice
Posted by Peter Newman at 3/12/2005 12:37:04 PM
I have a table containing 65 fields. One of the fields is a varchar(6) field which is unique and contains a client number . witin the 64 other fields there are 10 'PIN number' fields ( PIN1, PIN2 etc ) and i need to check if a given pin exists ie check if '123456' exists in PIN1, PIN2 - PI...more >>

Capturing stored proc names in profiler
Posted by Oliwa at 3/12/2005 12:31:17 PM
Hello, I was wondering if anyone had some insight into my problem. I'm running a trace and I want to generate a report to show some simple statistics about the duration, reads, and writes for the stored procedures in my database. I'm having trouble parsing the stored procedure name from ...more >>



Help with Query
Posted by Marek at 3/12/2005 11:55:02 AM
Hi, Am trying to work out how to perform a query. I have a table which contains finance cost codes (tblCostCodes). I have another table that contains Customers and the Cost Codes used by that Customer (tblCustomerCostCodes) - they are related by the CostCode field. What I want is to be a...more >>

recompile sp
Posted by Ed at 3/12/2005 9:11:09 AM
hi, I understand if the table structure is changed in terms of index and column, sp needs to be recompiled. is there anyway to tell if it is necessary to recompile the stored procedure. Thanks Ed...more >>

Select Top X problem
Posted by Adrian at 3/12/2005 7:42:55 AM
Using the following DLL ======================================================= CREATE TABLE [Test] ( [Job] [int] NULL , [Area] [int] NULL , [Town] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [Road] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [AddressID] [in...more >>

limite the resource a stored procedure can use
Posted by guoqi zheng at 3/12/2005 4:45:17 AM
Dear sir, Some times, some unimportant stored procedure on my application are using too much resource, etc 50% of CUP power. Is there a way to set the priority of a SP or limite the max resource it can use? thanks, Guoqi Zheng http://www.ureader.com...more >>

Concatenate a string in SQL
Posted by Jon A at 3/12/2005 3:23:07 AM
I have a char(10) column in a table, I would like to concatenate the string to a variable with coma's in between the strings. I currently use a cursor. Can any one think of a better way? -- Thanks, Jon A...more >>

How to solve this problem through SQL Server 2000 newid() procedur
Posted by JoseTA at 3/12/2005 1:03:01 AM
I have two tables like this: 1. Transfer Table: TranID, TranDate, PlaceID,..., Amount 2. Place Table: PlaceID, PlaceName I am sending the money one place to another place, like that I will receive the money from their also and will update in one database. so need some unique identification....more >>


DevelopmentNow Blog