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 > december 2005 > threads for saturday december 3

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

convert a datetime
Posted by Andrew Chalk at 12/3/2005 11:55:48 PM
If I issue: SELECT CAST(CAST('2000-05-08 12:36:29.998' AS datetime) AS bigint) AS Expr1 I get 36653 as the result. If I issue: SELECT CAST(CAST('2000-05-08 12:35:29.998' AS datetime) AS bigint) AS Expr1 I get the same result even though the times differ by one minute. Can a...more >>


SP and Triggers: object permissions
Posted by TR at 12/3/2005 9:36:48 PM
This question involves two distinct databases in SQL Server 2000. I have to create a trigger (for update and insert) which selects some rows from a table in *another* database. The problem is that when a domain user in DB#1 tries updates a row in this table and the trigger fires, SQL Server...more >>

unaccountable result for select
Posted by helmut woess at 12/3/2005 8:33:36 PM
Hi, I am using MSDE2000 sp4 and tried following: (you can copy it directly in QueryAnalizer) ----------------------------------------------------- declare @tbl table ( yyyymm int, id int, x int ) -- insert into @tbl values(200502,1,0) insert into @tbl values(200502,2,0)...more >>

Help with SQL Function
Posted by Stuart Shay at 12/3/2005 7:44:34 PM
Hello All: From the Following Table, I want to enter a Temperature and then have the SQL Function Return the Web Color -- TemperatureIndex -- ID TempMin TempMax WebColor 1 0 9 #E59DCB 2 10 19 #8569FA 3 20 29...more >>

order of columns in composite index
Posted by Bob Gabor at 12/3/2005 6:11:04 PM
I'm know that for composite indexes, the recommendation is always to specify the most selective column first, but can someone please explain why this makes such a huge difference in perfomance?? I have a table where column A only has 1 unique value and column B is basically unique among all r...more >>

Delete invalid Details
Posted by Islamegy® at 12/3/2005 5:33:32 PM
I need to delete invalid records in child table while parent have 2 Fields PrimaryKey like this ================================== Delete From AH_TasnFakaraat Where Master_ID,Fakra_ID not in (Select Master_ID, Fakra_ID From SubMaster) ============================== (,) is not acceptable ...more >>

Delete Duplicate Record
Posted by Islamegy® at 12/3/2005 5:19:00 PM
I have Changed my database schema and transform Data with new keys using this Query : SELECT Case_No, Case_Date, Ma7akem_ID, COUNT(*) AS Expr1 FROM Master_Ahkam GROUP BY Case_No, Case_Date, Ma7akem_ID HAVING (COUNT(*) > 1) Due to a Design error in the old one there was a ...more >>

Any performance issues if we use BigInt
Posted by Bob at 12/3/2005 5:03:56 PM
In the past, I've always used "int" for the Identity field. But as the application usage increases, it seems to demand for values that exceed the "int" scope. I'm thinking of upgrading all my Primary Keys that were "Int" to "BigInt". I'd like to know if there's any performance degradation by...more >>



queries filling up logfile
Posted by Santu at 12/3/2005 1:14:02 PM
There is a file in my c:\winnt\system32 by the name sysfile.log, and it contains what seem to be the queries a reporting tool uses, and its filling up on disk space real fast, is anyone aware of this problem please help..asap ...more >>

Administrative Tasks
Posted by PP at 12/3/2005 11:54:01 AM
Hi Can somebody please point me to good URL or may be some scripts that I can use to execute as part of DB health check. Also, I would like to see if the DB is well designed or thought of while it was created; I know its a wide subject, but I will be happy to get started with some script t...more >>

SP clause - where (field = @Param or @param is null) is this fast?
Posted by yitzak at 12/3/2005 10:21:21 AM
Hi It would SEEM to me that this is a rather neat way to write SPs Create proc mysp @LastName varchar(32) = NULL @Date datetime As Select Fieldlist from tblOrders where TranDate > @Date and ( @Lastname is null or name = @LastName) i..e if @Lastname is provided then f...more >>

Excel file import to Sql Server problem
Posted by GB at 12/3/2005 12:13:55 AM
Hello: I need to import an Excel file to SQL Server. The .xls file has the column names which contains dot inside, like AAA.BBB. When I import this file in SQL using DTS Import/Export tool, it creates a table with column names like AAA#BBB. So, during import process the dots substitutes with #...more >>

Recover the data
Posted by Lara at 12/3/2005 12:00:00 AM
Hi, My appln runs on a remote server. A few minutes ago i accidently ran a 'Truncate table' command. Is there anyway to recover it thru Query Analyzer. The DB Recovery model is SIMPLE and i have the dbOwner permission. Thanking in Advance Lara ...more >>


DevelopmentNow Blog