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 2005 > threads for saturday june 11

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

long SQL View formula
Posted by Stephen at 6/11/2005 11:37:08 PM
I have been migrating an MDB to SQL and have had to rewrite many of the queries into SQL Views. The problem I am having is that SQL doesn't seem to be able to use progressive formulas. Here is what I mean: I have a commisison calculation that requires about 20 differnent variables. Example ....more >>


Error 2812
Posted by Robert at 6/11/2005 12:23:01 PM
I am the owner of a database. I am listed as an owner as is dbo. All of the stored procs were owned by dbo. There is a user on the database named EDUser. EDUser was granted execution rights and everything was good. That is until I created a stored proc. EDUser was granted execution righ...more >>

Using uniqueidentifier as URL parameter
Posted by Arjen at 6/11/2005 12:10:36 PM
Hi, Do you see the following sample as "smart". ---------------------------------------------------------- | ID (int32) | Code (uniqueidentifier) | Title (nvarchar) | ... | ---------------------------------------------------------- ID is the key. I use this key also as foreignkey in other t...more >>

About automatic process at midnight
Posted by Kenny M. at 6/11/2005 10:41:02 AM
Hi I have a table1 which hold a field (amount) with 1000 rows The amount in the 1000 rows is consumed by clients during the day The next day the amounts have to return to their original values (at this time I’m doing that by hand) Now I’m going to save the original values in anothe...more >>

Using insert/update/delete statement in UDF
Posted by Tod at 6/11/2005 10:24:44 AM
Hi, When I use insert/update/delete statements in UDF I get error: CREATE FUNCTION FOO(@DUMMY VARCHAR(128)) RETURNS BIGINT AS BEGIN INSERT INTO MY_TABLE (MY_FIELD) VALUES ('xxx') ... ... ... END "Invalid use of 'INSERT' within a function" Is there any way to use ins...more >>

kill logged in processes to a database
Posted by Joseph at 6/11/2005 9:35:02 AM
How do kill all the processes in a database? Here is my situation; I copy a database called “Active” into a database called “Training” once a week. If there are still students logged into the Training database the job fails and I have to go and kill all the processes related to the T...more >>

all from one table to another
Posted by Alur at 6/11/2005 8:14:01 AM
I know one way (but it is complicated (using fetch)) copiing all data from one table to another table with the same fields, but with different table name. Could you tell me the easiest way to do that ?...more >>

LEFT out join question
Posted by Steve Wonderful at 6/11/2005 6:34:01 AM
How to interprete the result set from this query (the filter: AND E.deptno IS NULL in the ON confuses me): Result: Deptno deptname empid empname deptno jobid salary ----------- --------------- ----------- ---------- ----------- ----------- --------- ...more >>



Attaching without ldf file
Posted by Alur at 6/11/2005 6:11:02 AM
I tried to attach mdf file without ldf file. However: "Error 1813: Could not open new database 'GJIRB'. CREATE DATABASE is aborted. Device activation error. The physical file name 'C:\ ...\db_name.LDF' may be incorrect." Then: "Attaching database has failed." If one has not have ldf file is ...more >>

Query batch completed with errors...
Posted by Sam at 6/11/2005 4:15:01 AM
Hi, I am executin a stored procedure which contains a sequence of Stored procedures. One of these stored procedures is a cursor-stored procedure (basically a cursor). At the end of the execution of this Stp(cursor), it gives me "query batch completed with errors". I tried to capture the er...more >>

Cannot truncate logfile in SQL server 2000
Posted by Nilkanth Desai at 6/11/2005 1:35:03 AM
Nilkanth Desai nsdesai@tis-world.com I am using SQL Server 2000. In this case database size is 750 MB and since last 10 days its logfile is constantly increasing its size. Since last 2 days it has crossed 14GB. Thses logfiles are having extension of .ldf. I have tried shrink database optio...more >>

dropping a table on a linked server
Posted by at 6/11/2005 12:00:00 AM
What is the SQL for dropping a table on a linked server? Using: DROP TABLE LINKEDSERVERNAME..USER..TABLENAME doesn't work. ...more >>

Disabling constraints
Posted by Frédéric Mayot at 6/11/2005 12:00:00 AM
Hi, I need to disable all the foreign key and primary key constraints in a table and reenable them at the end of my commands. I can use ALTER TABLE to do this but I was wondering if it is a good practise. It is not maintenance code but production code. Everything is done in a transaction b...more >>

tempdb not shrinking
Posted by AM at 6/11/2005 12:00:00 AM
Hi all My tempdb data file increased upto 45Gb and it is 99% free. I try to shrink it but it was not shrinking. But after some time suddenly it shrinks. Why this happens? Why it was not shrinking before? -- Thanks ...more >>

Dynamic SQL
Posted by Mike Labosh at 6/11/2005 12:00:00 AM
I have this code here that has its WHERE clause dynamically built... -- Calling Code DECLARE @matches INT SET @matches = 0 DECLARE @whereClause NVARCHAR(4000) IF @clmrKey IS NULL SET @whereClause = ' WHERE ...' ELSE SET @whereClause = ' WHERE ...' DECLARE @sql NVARCHAR(4000) ...more >>

Query Problem
Posted by Werner at 6/11/2005 12:00:00 AM
Hi, I have a table like this: StringID,LanguageID and StringValue. The table contains strings in different languages. Strings with the equal meaning have the same StringID but a different LanguageID. Here is a example: LanguageID 1 - english 2 - german StringTbl 1,1,home 1,2,Haus ...more >>


DevelopmentNow Blog