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 > july 2003 > threads for friday july 4

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

MMC problem
Posted by Jason Davis at 7/4/2003 7:50:08 PM
I just installed SP3a and my MMC (SQL SnapIn) stopped working. mmc.exe - Application Error (The instruction at "0x771cd80b" reference memory at "0x000000000". The memory could not be "read". I tried running the Enterprise Manager directly, same issue. I tried running a new MMC, but I get a c...more >>


New Stored Procedure. Help me to write it.
Posted by Andrea Moro at 7/4/2003 6:46:35 PM
I must to implent a sp that checks data into a one to one relationed table and let me know if all data is available or not. To better understand (sorry for my poor english) imagine this. TABLE 1 ID DESCR QTA 1 aaa 1 2 bbb 1 TABLE 2 ID DE...more >>

UPDATE with inner join
Posted by Simon at 7/4/2003 4:54:12 PM
Does anybody know why inner join doesn't work? UPDATE olapSkladisce INNER JOIN carinskoTest ON (olapSkladisce.idDrzave = carinskoTest.idDrzave) AND (olapSkladisce.idSkladisca = carinskoTest.idSkladisca) SET olapSkladisce.nazivSkladisca=[carinskoTest].[nazivSkladisca], olapSkladisce.opisSkla...more >>

Renumber a field
Posted by michael at 7/4/2003 3:55:38 PM
Does anyone have any examples of how I would go about renumbering a field, say the field starts with Alpha Numeric characters like AB and the number starts at 1000. If there are any good SQL tutorials or sites that would explain tthis that would be helpful also. Thanks In Advance and...more >>

CrossTab Question
Posted by Jason MacKenzie at 7/4/2003 3:02:15 PM
Here's a different twist on my previous question. Any help is tremendously appreciated. If any more information is needed I'll be happy to provide it. SELECT TOP 100 PERCENT MonthName, Month, SUM(CASE WHEN StatusName = 'Complete...more >>

Manipulating the results of sp_who
Posted by Ioannis Demetriades at 7/4/2003 1:18:32 PM
Hi, Is there a way of manipulating the results of sp_who from within a stored procedure? I basically need to call sp_who <UserName> and get all the open sesions of <UserName> and then filter out the records based on the dbName. Can this be done in a stored procedure? Thanks Ioannis ...more >>

The simples thing ;)
Posted by JanS at 7/4/2003 12:56:53 PM
Hi, How to perform such a thing: when column DATE is changed I would like to increse column COUNT (+1). I think that trigger is what I should use, but I can't find such a smiple example in documentaion. I'm very beginer... Than You. JanS...more >>

sql query
Posted by Student at 7/4/2003 12:22:26 PM
Mytable has 20 fields.I need select three columns from mytable. My query: ' select columnname1,columnname2,columnname3 from mytable ' Sometimes I don't want make it too long. I write this way 'select * from mytable'. But I don't know if they are the same on performance. r they the ...more >>



DTS task
Posted by Simon at 7/4/2003 11:55:18 AM
I create DTS task to copy data from one table from one database to another table in other database every day. But for the data, which was copied in the past days, it create error: Violation of primary key. Cannot insert duplicate key in object 'table2'. Is it possible to update old data and co...more >>

How to capture this error?
Posted by davidw at 7/4/2003 11:50:33 AM
I found codes like this: EXEC( 'DECLARE @Handle int EXEC sp_xml_preparedocument @Handle OUT, ''' + @xml_0 + @xml_1 + @xml_2 + @xml_3 + ''' DECLARE he_cur CURSOR FOR SELECT @Handle' ) OPEN he_cur FETCH he_cur INTO @xml_he DEALLOCATE he_cur IF @xml_he IS NULL RAISERROR( 'Invalid ...more >>

Sql Script Parameter???
Posted by Dishan at 7/4/2003 11:46:00 AM
Hi All, Does anyone knows how to pass the parameter to the sql script. ex. I have db creation script db.sql and it has db name . I want to pass the db name somehow .. commandline?? I konw how to run script in cmd promt . but dont know how to pass param. Thanks regards Dishan ...more >>

how to extract data filtering by a DateTime field (depending sample period time) ?
Posted by herve maillard at 7/4/2003 11:43:16 AM
Hi, I have the following table : Variable Date_Hour Value var1 12/06/03 06:00:00 18 var1 12/06/03 06:00:05 21 var1 12/06/03 06:00:17 23 var1 12/06/03 06:00:23 89 var1 12/06/03 06:00:28 ...more >>

SUM
Posted by Nice Chap at 7/4/2003 11:28:30 AM
I have two result sets that look like: Resultset 1 ------------------ GBP 10 USD 20 DEM 20 Resultset 2 ----------------- GBP 10 USD 40 I need a final result set Final Resultset ----------------- GBP 20 USD 60 DEM 20 How can achieve this ? ...more >>

Functions
Posted by Nice Chap at 7/4/2003 11:25:54 AM
Do you know if Sql Server User defined Functions are an ANSI Standard ? ...more >>

Stored procedures and UNION (SQL Server 2000)
Posted by Marius Horak at 7/4/2003 11:14:05 AM
SELECT * FROM OPENQUERY (DEVSVR1, 'EXEC MSIS.DBO.XXXX 1,2,6,"20030101","20031231",1') UNION SELECT * FROM OPENQUERY (DEVSVR1, 'EXEC MSIS.DBO.XXXX 1,6,10,"20030101","20031231",2') This will come with message: Could not execute query against OLE DB provider 'SQLOLEDB'. The provider ...more >>

Built In- stored procedure
Posted by Tan Kun Wei at 7/4/2003 10:50:39 AM
Where can I get the source code for all built-in stored procedure ? eg.'sp_who2' Regards Tan ...more >>

Query Question
Posted by Jason MacKenzie at 7/4/2003 10:17:41 AM
I apologize if this gets posted twice. A lot of my messages are not getting through I could use some help with a query. I have a table called ProjectStatus which contains the Status history of a project. I want my query to output results in the following format: Status Month...more >>

size of the results of a SQL query
Posted by thibaut neiger at 7/4/2003 9:56:57 AM
Hello I'd like to know the datatype of all columns of a SQL query. For instance, for the query : "select NAME, PHONENUMBER from PEOPLE", I'd like to get the type of NAME and the type of PHONENUMBER (varchar and number, in my sample). I can do this by doing a "desc PEOPLE". It will work i...more >>

function - Is Server up
Posted by doug at 7/4/2003 8:55:53 AM
hi all, i would like to write a function which determines whether a given server is up and running. i can use xp_cmdshell with ping in a proc, directing output to a temp table, but alas not in a function. any ideas? doug...more >>

Temporary Table Query
Posted by Jonathan Derbyshire at 7/4/2003 8:02:57 AM
Hi, I am inserting data into a temporary table using the following method: select a into #b from c This method works fine, but...if i want to choose what is inserted into temporary table #b, like in this sproc: if @choice = 'A' begin select a into #b from c wher...more >>

ORDER BY Question
Posted by Steve at 7/4/2003 7:09:49 AM
Hi All, This may be a little difficult to explain but here goes... I have two tables one for companies and one for offices. Threre is potentially many offices to one company. The office table has a field 'Verified_Date' in it. What I need to do is return a distinct list of companies (i.e., ...more >>

Commit Control
Posted by Marco at 7/4/2003 3:49:26 AM
My company is porting some software that we have running on Oracle and DB2 to SQL Server. For our big batch programs(Microfocus COBOL) we have a transaction Commit frequency that is controlled by a data variable on a table. We don't see any performance difference, i.e. elapsed job t...more >>

strange subquery behaviour?
Posted by HSalim at 7/4/2003 2:09:20 AM
Hi All. first thanks to Umachandar for suggesting the use of NewID() . I understand this is undocumented and unsupported etc... Any ideas or insight into this would be most welcome. Please see DDL below The goal is to select 5 items per department and assign it for audit. When I use a si...more >>


DevelopmentNow Blog