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 2007 > threads for thursday june 21

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

How to pass a global variable from parent to child package in DTS?
Posted by Jean at 6/21/2007 11:33:36 PM
hello, (SQL Server 2000, DTS) I have a parent package that includes a number of child packages. Each child package is an Execute Task package. I declare the global variables (e.g. SOURCE, DESTINATION) of the parent package in the package properties. Then, I set them using a Dynamic Prope...more >>


check constraint for punctuation
Posted by Boot2TheHead at 6/21/2007 7:08:39 PM
I have a database table that should allow punctuation in one column, but not all punctuation. I added a check constraint like so: ([MyColName] like '%[a-zA-Z0-9!@~#$^&*()_+-{};:",.]%') However, it isn't working like I think it should. If I take the last % out, the existing data in the database...more >>

Assistance ith datetime and datename
Posted by Chris at 6/21/2007 4:57:01 PM
Hi, I am having problems with this query (sample) SELECT product_number, delivery_date, ... from dbo.archive where year(year,traxdate) = '2006' AND datename(month,traxdate) between 'January' AND 'February' AND product_number = 1234 ...more >>

Importing XML data into a table (shredding)
Posted by David Olsen at 6/21/2007 4:16:25 PM
I need to bring the following data in an xml format (many more years included) into the table listed at the bottom of this request. This data is in a large text file, say in c:\calendar.xml <Calendar> <ActualDate>2005-01-01T00:00:00</ActualDate> <MonthName>January </MonthName>...more >>

using isnull in where clause
Posted by DBA at 6/21/2007 2:26:00 PM
Is there a way to use isnull in a where clause and joining multiple tables?...more >>

SQL Server 2005 Express, can a stored procedure call a soap service?
Posted by sandal at 6/21/2007 2:02:58 PM
Can a sql server 2005 express stored procedure call a soap service? In my case the soap service with the data I'd want to tap would be installed on the same server as the sql server. If there is more than one way to call a soap service from a sproc, what are they? Any good beginner level tut...more >>

Cross tab query with correct order
Posted by gv at 6/21/2007 1:10:28 PM
Hi all, using SQL 2000 sp4 I'm trying to create cross tab query and all seems to work fine except I want the order of type to be in the same order of each row. In the top table I just have the order of the type for the later query below. But not sure how to use it to create the correct ...more >>

Tying sysschedules back to job
Posted by Scott at 6/21/2007 12:51:01 PM
I am trying to query the job schedules and link them back to the job name. Does anyone know how to link the sysschedules table back to the sysJobs table? Is there some intermediate file?...more >>



Cross post from excel programming... my bad!
Posted by Stephen at 6/21/2007 12:07:07 PM
Hi Folks, I know I'm cross posting (humbly bowing head) but I think I might be more inclined to find an answer in here and I'm running out of time... I'm trying to create a query that might require a join of somekind but after reading a number of web articles on joins I'm now more confused...more >>

Stored Procedure Know What Parameters It Has?
Posted by lucius at 6/21/2007 11:55:42 AM
I think I want to write a stored procedure that has 7 input parameters, any of which will be null. Is there a kind of "parameter list" functionality in TSQL I can use to interrogate them to know which ones are null and which ones are not without doing a lot of IF logic? Thanks....more >>

Confusing Error Message: Could not find database ID 44.
Posted by Duke Carey at 6/21/2007 11:26:01 AM
Full error message from VB Express: Could not find database ID 44. Database may not be activated yet or may be in transition. I have a little VBExpress app that populates a Treeview and a Listview control, based on views in my database that pulled data from a vendor's SQL 2000 database. ...more >>

Named instance of SQL SERVER 2005
Posted by Adalberto Andrade at 6/21/2007 11:21:03 AM
I need to delete one named instance of SQL SERVER 2005. All information that I found out is to make a complete reinstall of SQL SERVER 2005, but it isn´t a solution for mi because I have two named instance and I must keep one of them. Any help will be appreciate. ...more >>

Purge process performance
Posted by Pedja at 6/21/2007 11:05:00 AM
Hi, I have very large sql server 2000 database here (~1TB), and we have purge process setup in place which purges old customer transactions from the database. I know that sql server 2005 and data partitioning would be perfect solution for this problem, but that is not realistic now. Anyway, w...more >>

SP Optimization
Posted by tom d at 6/21/2007 10:44:00 AM
Hi All, In the SP below, do you see anywhere that I can optimize to avoid deadlock and make it more efficient from the DBA perspective. Thanks in advance! CREATE PROCEDURE dbo.PODTL_AutoDisp_U_SP (@PO_ID INT , @CUST_ACCT_NBR CHAR(9) ...more >>

TRY / CATCH in a Trigger
Posted by Todd C at 6/21/2007 8:58:00 AM
Hello All: I have an ON INSERT trigger structured something like this: BEGIN TRY BEGIN TRAN <do some logic here> <execute a couple of procs in another database, same server> COMMIT TRAN END TRY BEGIN CATCH ROLLBACK TRAN RETURN END CATCH Now, the who...more >>

Yet another problem with Connection Timeout
Posted by sebseb at 6/21/2007 8:36:03 AM
Hello all, I have a problem with Connection Timeout, but kind of different from almost everybody else problem. My connection timeout is not to short for my query, in the opposite, it's too long. In my application I try to connect to a database, but in case the user entered a wrong IP ad...more >>

select * from (exec my_SP 'test') t1 not working - how to work?
Posted by Rich at 6/21/2007 8:25:01 AM
I need to perform some group by operations on the resultset from a store procedure. Select columnX, count(*) cnt from (exec my_sp 'test') t1 Group By columnX is there a way to do something like this without altering the stored procedure? How to do it? Thanks, Rich...more >>

"SELECT TOP @n" problem
Posted by Andrew at 6/21/2007 8:09:03 AM
Hello, friends, I created a stored procedure (sp), in which I need only to return top n records, not all (say 10,000) records. Since this n value may vary, I pass it as an sp parameter. However, as you know, an SQL statement like SELECT TOP @n employeeID, employeeLastName, employe...more >>

cast/convert of smallmoney
Posted by B D Jensen at 6/21/2007 7:59:44 AM
Hi! I expected that "castVersion" and "convertVersion" should return string "0.0001" (SS2005), but they didn't. I found a workaround/solution, but can't understand reading the documentation why it doesn't work as I expected... Can anyone explain? select cast(0.0001 as smallmoney) or...more >>

SQL Server 2000:Foreign Key Constraint Errors when Creating Database Diagrams
Posted by Bill Gerrard at 6/21/2007 7:56:32 AM
I am getting the following error message when attempting to save a database diagram, which I am creating on an existing database. ------------------------------------------------------------------------------------------------------------------------------------------------------------------ - ...more >>

IDENTITY_INSERT On A Temp Table
Posted by 47computers NO[at]SPAM gmail.com at 6/21/2007 7:50:20 AM
I'm working on a simple stored procedure that will help us reduce trips to the database in nested loops in our code. The purpose is to grab a given "client" record from a table and loop until it also has any related "client" records for billing purposes (such as a parent client who pays the bil...more >>

Bill of material
Posted by bazedo NO[at]SPAM gmail.com at 6/21/2007 7:15:45 AM
just a very simple question, I have to design a e/r diagram for a BOM. it is a hierarchy structure, so i need to some ideas to make it! thank you ...more >>

Update different columns based on an index
Posted by Roger Tranchez at 6/21/2007 6:56:02 AM
Hello, ... I have something similar to this piece of code: ------------------------------------------------------------------------ declare @i int set @i=1 while @i<=4 begin UPDATE Table1 SET field1=RESULTS.MYSUM FROM (SELECT max(FIELDn) as FIELDn,SUM(FIELDn) AS MYSUM FROM TABLE...more >>

Maximum commands in a transaction
Posted by hardieca NO[at]SPAM hotmail.com at 6/21/2007 5:44:02 AM
Hi, I'm building a CMS for a website that I envision getting to be quite large. The CMS will have a development environment where entire sections will be sandboxed for editors to edit and create pages. My concern is that to keep the pages consistent and links working properly, I need to use...more >>

Auditing DDL and schema changes in SQL Server 2000
Posted by acmcdba68 at 6/21/2007 5:07:00 AM
Rather than reinvent the wheel, I was hoping that there was someone who has already created a script allowing for the auditing of DDL statements, schema changes within the database for SQL Server 2000. I can easily capture the aforementioned in SQL 2005 by making use of a trigger on DDL_DA...more >>

Funct.Remove on or more ',' on the end and replace more ',,,' with
Posted by Xavier at 6/21/2007 4:05:00 AM
Hello, In a stored procedures there is an input parameter in which all ',' on the end must be replaced. How can this best be done. What function ould i use. The number of ',' is not known. It coulb be 0,3,5 ,, example1: @p1=a,dd,f,,,,,, should be transformed in a,dd,f @p1=aq,ddw,f n...more >>

Need Help With Count
Posted by Chamark via SQLMonster.com at 6/21/2007 12:00:00 AM
Using SQL2000. Table is Errors Site AssociateID ErrorType ErrorDate I want to be able to produce results in this format Site | # Errors 1| # Errors 2| # Errors 3| # Errors 4| A 10 3 10 1 B 3 4 5 ...more >>

In clause
Posted by Paul at 6/21/2007 12:00:00 AM
I am trying to use the in clause in the following query Declare @var varchar(50) Select @var=mylist From table1 Where myid=1 Select id From table2 Where id in (@var) My problem is that the @var is set to 5,7,13,30, which is without the single quotes around the values. If I hard cod...more >>

Concurrency and locking
Posted by Anders K. Olsen at 6/21/2007 12:00:00 AM
Hello all We have a problem in my project, that I would like some advice on how to slove it using SQLServer. We have a cluster server setup with two loadbalanced servers (A and B). Requests are comming in through web services. In part of our application, we need to read some data from t...more >>

DB Compare
Posted by Mani at 6/21/2007 12:00:00 AM
Hi All, Greetings! Do any one have idea about how to compare the Database Programatically, like comparing the whole schema, tables, structures, procedures, controlling the version, updations and etc. There are having many tools to do this. But i have to do this requirement as programatical...more >>

Check Constraint among tables
Posted by Bassam at 6/21/2007 12:00:00 AM
Hello, I have 2 items discount tables Discount which is having this schema (in short) DisID , INT , PKey FromDate , datetime ToDate , datetime and DiscountItem , which is having this schema DItemID , INT , PKey ItemID , INT I need to prevent users from defining one item in more ...more >>

Client configuration on 2005
Posted by Roy Goldhammer at 6/21/2007 12:00:00 AM
Hello there On sql server 2000 if i needed to see all the available servers can be use i was do it with client configuration tools and server configuration tools which tool on sql server 2005 do the same thing? ...more >>

RePost: Table Structure Question
Posted by Daren Hawes at 6/21/2007 12:00:00 AM
Hi, This is hard to explain so I will try my best for my own sake! I have a website that will compare two or more items. Lets say MP3 players. I need to comapre them side by side. Lets say the phone has the following attributes to compare; Model Size Memory OS Now it would be eas...more >>

duplicate cases
Posted by Raul at 6/21/2007 12:00:00 AM
is there a function where I can delete duplicate records? I can use the casenumber field to check for duplicates. BUT...How? Thanks, Raul Rego NJPIES ...more >>


DevelopmentNow Blog