Groups | Blog | Home


Archived Months
January 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
all groups > sql server (alternate) > may 2006 > threads for may 1 - 7, 2006

Filter by week: 1 2 3 4 5

WinXP, SQL Server 2000, Queries
Posted by David at 5/7/2006 11:46:11 PM
Hi, Does anyone know if MS SQL Server 2000, will run stability on a Windows XP based O/S, using one of the new Dual Core chips, or HT chips? Especially given that when you install it you get compatability warnings? Thanks David ...more >>


locating set of points close to one another (within a threshold)
Posted by bevanward NO[at]SPAM gmail.com at 5/6/2006 6:38:23 AM
Hi all I have a large data set of points situated in 3d space. I have a simple primary key and an x, y and z value. What I would like is an efficient method for finding the group of points within a threshold. So far I have tested the following however it is very slow. --------------- ...more >>

Backup SQL Files
Posted by David at 5/6/2006 3:25:48 AM
Hi, We are about to install MSSQL Server 2000, on a Windows XP Home Machine. However, we have servers we could set routine backups of files to be done to. What what be the best way of doing this? Is there functionality in SQL Server 2000, where we can say dump all data definitions, accounts...more >>

Help with update trigger
Posted by rdraider at 5/5/2006 8:31:34 PM
Hi all, I know squat about triggers so was hoping somebody could point me in the right direction. I wanted to copy an email address field from a salesman table to a note field in a customer table. Seems easy enough for a one time update. But I would like to add a trigger to auto-update the...more >>

Problem moving msdb
Posted by raj.raghavan NO[at]SPAM gmail.com at 5/5/2006 2:30:21 PM
Hi, I am trying to move the msdb database, I am following the MS technet document. I have added trace flag "-T3608" to startup parameters, restarted the SQL server, stopped the agent, detatached the msdb successfully. I moved the mdf and ldf to the new location and I removed trace flag and when...more >>

return into one string
Posted by cybergoth_0 NO[at]SPAM yahoo.co.uk at 5/5/2006 2:23:07 AM
I have a table with a column called AccessTypes which contains a single letter. I want to return these accesstypes from a query into one string. e.g. if there were 3 entries of A, S and D I want to select them and instead of returning 3 rows, I want just 1 string like "ASD" can it be d...more >>

help for query
Posted by Generale Cluster at 5/4/2006 3:46:30 PM
Hello, I have a table "log" with the following fields: -log_id (int) -cust_id (string) -type (int) -service_id (int) type may be 0,1 or 10 I need to fetch one row for each type for each service_id for a specific cust_id. That is, if I have 3 different service_id's and I assume tha...more >>

DTSRUN privileges?
Posted by Brian Peasland at 5/4/2006 3:06:42 PM
I am trying to get a DTS package to be run from the command line with the dtsrun utility. The DTS package is stored in the database. The user I supply is a user in the database. I get an error stating "SQL Server does not exist or access denied." It looks to me like the SQL Server instance d...more >>



Using trigger to export xml file
Posted by lytung NO[at]SPAM gmail.com at 5/4/2006 11:23:36 AM
Hi all, i am having trouble trying to export this in xml. Basically inside an update trigger i need to export in xml or file the qty that has been changed. This then gets updated to another system. Is this a good idea ? should i be using another table in between in case something happens on ...more >>

Table Joins on more than one field
Posted by das at 5/4/2006 8:12:54 AM
Hello all, Can someone help me with this SQL? 1) EMPLOYEE table has columns 'employee_id' and 'emp_sid' and other columns 2) EMPLOYEE_BENEFITS table has a column called employee_entity, this column can be joined to either 'employee_id' OR 'emp_sid' but not both in the EMPLOYEE table. ...more >>

how to find conditions across rows (attendance)
Posted by rcamarda at 5/4/2006 7:04:51 AM
Hello, I need to find students that have 4 consecutive absences. When a student is absent 4 times in a row, they can be dropped from the class. My class attendance file contains each attendance by date and whether they were present or not. When the student has 4 consecutive value 1 (absent) f...more >>

Gather Format and Store - Right or Wrong
Posted by rlm at 5/4/2006 5:56:47 AM
The IT group that I work with has the habit of gathering data, formatting (i.e. in reports) and then storing the same formated data in the same database. I think the practice is wrong. I think the activity is fundamentally wrong because we are storing the exact same data in a database in two ...more >>

Join multiple records into one field
Posted by Terren at 5/4/2006 2:14:14 AM
Is there a way to create one field from multiple records using sql. For example Table 1 John 18 Peter 18 David 18 Now I want an sql query that when executed will return a field that looks like this Query1 John Peter David So basically it will return one record with all the n...more >>

Partition function - Unknow range column
Posted by sameer_deshpande at 5/4/2006 2:11:08 AM
Hi, I need to create a partition table but the column on which I need to create a partition may not have any logical ranges. So while creating or defining partition function I can not use any range. like CREATE PARTITION FUNCTION my_part_func (NUMERIC(7)) AS RANGE LEFT FOR VALUES (1,100,...more >>

Problems with view
Posted by Sascha82 at 5/4/2006 12:09:50 AM
Hi at all, I've got some problems with a view. How can I get all rows out of a view to show them all in a php side? Thanks a lot. Sascha ...more >>

Selecting MAX (Date) - Performance Question
Posted by Beowulf at 5/3/2006 7:10:55 PM
I have the following function(s) that each joins an active record with it's most recent record in an audit trail table, to show differences. I've perused the execution plans for 2 versions of this function in QA and it seems to me that the two versions execute identically - that is, the addr...more >>

Use variable for datasource in Opendatasource
Posted by lonestarprogramming NO[at]SPAM gmail.com at 5/3/2006 3:34:34 PM
I would like to create a stored procedure that imports an Excel file to a sql server table. I need to be able to pass the path to the spreadsheet to the stored procedure like so: CREATE PROCEDURE dbo.ImportSpreadsheet ( @Path nvarchar(120) ) AS SELECT * INTO Audit FROM OPENDAT...more >>

Date creation in SQL
Posted by wgblackmon NO[at]SPAM yahoo.com at 5/3/2006 1:24:00 PM
Hi, I have a parameter that is being input as a String via Crystal Reports. It's called 'School Year' and a typical value is '2006'. I need to be able to create a 'Date' that is compared to a field value in a where clause. In this case the db field is called 'requisition_time_stamp' in the T_O...more >>

Tuning on Oracle 10g and SQL Server 2005
Posted by mleal at 5/3/2006 12:57:05 PM
Does anyone have some more detailed information about how Oracle and MS implement / allow Tuning on Oracle 10g and SQL Server 2005 and the differences between them? Which of them, In a deep comparison about it, allow better tuning and why. Regards, Marcio Evangelista ...more >>

How to do an equivelent First() operation
Posted by rss NO[at]SPAM ddsc.com at 5/3/2006 12:45:58 PM
set rowcount 1 select Idnum1,Idnum3 from mytable order by Idnum1 DESC, idnum3 ASC is equivelent to select first(Idnum1),first(idnum3) from mytable order by first(Idnum1) DESC ,first(Idnum3) ASC Isn't that silly? why did Microsoft not add an agregate function First for the Microsoft ...more >>

SQL Counting number of non-distinct rows?
Posted by David at 5/3/2006 9:17:14 AM
Hi, I have a table that for ease has this data in: R1, R2, R....z --------------------- A | 12 A | 22 A | 30 B | 0 B | -1 B | -3 C | 100 I want to generate a table for each distinct row in R1, gives a count of all the rows with data corresponding For the above table I would get ...more >>

Problem with using BETWEEN for date range...
Posted by Jim Armstrong at 5/3/2006 8:28:03 AM
Hi all - This problem has been driving me crazy, and I'm hoping the answer is something stupid I am neglecting to see.... The procedure posted below is part of an Access/SQL database I have developed. Basically, the user would input a beginning and ending date, and the query goes and pulls ...more >>

An odd quandry.
Posted by KyussWren NO[at]SPAM gmail.com at 5/2/2006 6:55:27 PM
So I've set up 3 tables for some recursive data verification for an object link embedding procedure. Basically importing filenames. The three fields in question are identical. Document_link.key2_value document_link_staging.key2_value document_link_storage.key2_value And these three fi...more >>

Raising errors in a catch block in SQL2005
Posted by davidz at 5/2/2006 4:13:43 PM
When a catchable error occurs in a try block, control is passed to the associated catch block. While I am then able to examine properties of the error using such functions as ERROR_NUMBER() in the catch block, the error-logging scheme used in my company requires that the actual error be raised ...more >>

Stuck execution plan?
Posted by Dimitri Furman at 5/2/2006 3:03:28 PM
Using SQL Server 2000 SP4. There is a relatively complex stored procedure that usually completes in less than 20 seconds. Occasionally it times out after 180 seconds. The SP is called via ADO 2.8, using adCmdStoredProc command type. If I use Profiler to capture the EXEC that ADO sends to ru...more >>

How do I use pass data to/from stored procedure
Posted by rcamarda at 5/2/2006 2:36:51 PM
Hello, I read an article on how to use Yahoos API to GeoCode addresses. Based on the article I created a stored procedure that is used as follows: SPGeocode '2121 15st north' ,'arlington' ,'va' ,'warehouse-test' Returns: Latitude Longitude GeoCodedCity GeoCodedState GeoCodedCountry Precis...more >>

Load XML souce file to a SP parameter
Posted by viriyur NO[at]SPAM gmail.com at 5/2/2006 2:21:48 PM
I have a proc like this (T-SQL, SQL Server 2000): Alter Proc ImportXML @chvFullFileName varchar(200), @txtInputXML text='' AS My question is how can I load the contents of the XMLFile into the parameter called @txtInputXML ? Let us say my full file path is C:\XML\SampleXML.txt. I want to ...more >>

String matching precedence
Posted by jim_geissman NO[at]SPAM countrywide.com at 5/2/2006 12:29:32 PM
An application filters records based on names found in them. For example, looking through property buyer names, looking for banks and relocation companies. I have a table of names and patterns: CREATE TABLE #Filters (Pattern varchar(100), IfWildCard int, Category int) INSERT #Filters SELE...more >>

How can I insert # in a character field
Posted by sweetpotatop NO[at]SPAM yahoo.com at 5/2/2006 11:46:45 AM
Hello, I wonder how I can insert a string which contains #, as # is a special characters in sql Thanks ...more >>

Transactional Replication - Modifying Target Tables
Posted by DickChristoph at 5/2/2006 9:54:14 AM
Hi I tried posting this query in microsoft.public.sqlserver.programming but got no response. I am new to replication but I am trying to setup up a transactional replication of tables from one database to another in MSSQL 2000 (SP2). My target tables have primary keys defined. Under publi...more >>

ANSI Nulls
Posted by jim_geissman NO[at]SPAM countrywide.com at 5/2/2006 9:40:08 AM
I've mentioned this before, but now it's got me stuck. I have a table-valued function that was created using QA in SQL 2000. I can't edit it using 2005 Mgt Studio, because the property AnsiNullsStatus isn't set (apparently SQL 2000 forgot to set it when creating the function). Now I find I re...more >>

Converting Int value to datetime
Posted by smileydip at 5/1/2006 11:32:08 PM
Hi Guys, Could some help me.... I am trying to use the below specified two field from "SysJobHistory" table from "MSDB". Field name "run_date" and "run_time". Both this fields are of INT data type. Data saved in the above two fields is in this this format 20060501 and 204001 respectively. I want...more >>

Getting a unique ID in SQL Server - other than a GUID
Posted by Brad Eck at 5/1/2006 9:40:52 PM
In Access, newID returns a unique for the table. In SQL Server, newid() returns a GUID - unique in the world. I do not need or desire that complexity. Is there a way to get a simple unique int on the table in SQL Server? Brad Eck http://www.sitesdynamic.com http://www.basketsetcetera.com ...more >>

Syntax Help!
Posted by jared.pohl NO[at]SPAM gmail.com at 5/1/2006 9:09:40 PM
Hi guys.. When I try and run the following code it says that there is a missing operator.. SELECT curr.portfolio_code, curr.date, (curr.gross_index-mo1.gross_index)/mo1.gross_index AS 1MONTH_RETURN, (curr.gross_index-mo1.gross_index)/mo1.gross_index AS 3MONTH_RETURN FROM portfolio_...more >>

Database name not found in the Edit job step in SQL Server Enterprise Manager
Posted by arunkumar_m2001 NO[at]SPAM yahoo.com at 5/1/2006 2:58:19 PM
Hi, I need help. I transferred my database from one server to another by using attach detach process.I created all the jobs which existed in the old server in the new server. Everything looked fine but a couple of jobs is a giving me some problems. When I try to edit the job step I could se...more >>

DTC
Posted by Randal at 5/1/2006 11:52:23 AM
Does anyone have any instructions on how to setup the MSDTC properly and make it work with all the security updates. I am trying to communicate between to windows 2000 machines and I am getting: Error 8524 The current Transaction could not be Exported to the Remote Provider. The distrib...more >>

Sql 7
Posted by KR at 5/1/2006 7:10:38 AM
Hi, What is the equivalent of the "Full Recovery Model" in sql 7? I see only two options - for recovery models - "Truncate at Check Point" and "Select Into/Bulk copy. Thanks KR ...more >>


DevelopmentNow Blog