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
August 2008


all groups > sql server programming > february 2007 > threads for monday february 12

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

Performance Issue
Posted by GRYPTONITE at 2/12/2007 8:14:01 PM
Is there any way to improve the following query! Incidently the original code did not have union between SELECT queries instead had separate Insert statements per the given union. What is the best solution, what indexes do you recommend. The reason I am asking is I get a time out error and th...more >>

text editor
Posted by GB at 2/12/2007 8:05:45 PM
Hello, I need free text file editor which allow to see character line position number. Could any body give me a hint? Thanks, GB ...more >>

Extract left part of string, until number.
Posted by Mr. Smith at 2/12/2007 6:55:36 PM
Hi. I have product id's on the form: ABC000001 ABC000002 ABCD000001 ABCD000002 How can I extract the left "character" part of the string (ABC and ABCD) since it does not work with left(string,3). I want this kind of code: left(string,until find(0-9)) Any hints appreciated Kind re...more >>

SSIS 2005 and SQL2000 DBs?
Posted by brett at 2/12/2007 4:55:38 PM
Would there be any problems of using SSIS 2005 to connect with MSSQL2000 databases? I want to ditch EM and QA for SSIS. Can I install just Studio on my desktop or do I also need the 2005 engine? Thanks, Brett ...more >>

Update Trigger
Posted by Ed at 2/12/2007 4:26:02 PM
I have a table which has about 50 fields. Is there anyway to create an update to tell what fileds (may be more than one fields) were changed without using 50 "If Update()" statments. I would like to create a table that has all the audit info on that table with "ColumnName", "Original Value...more >>

storing result of store procedures in file
Posted by Roy Goldhammer at 2/12/2007 4:02:33 PM
Hello there I've built a store procedure with dinamic sql which create new database, set security, ect.... in the dinamic sql i use Restore Database and many other actions. like dbcc checkdb ect... each of the actions are returning message that i would like to store in file as log for...more >>

Planning triggers
Posted by Roy Goldhammer at 2/12/2007 3:52:05 PM
Hello there I have database bound to an access application. In the access application i have form that update data on more then one table (Clients, sales, departments) the client table has for update trigger that insert the old record to history trigger. After I add another triggers ...more >>

DateTime
Posted by shapper at 2/12/2007 3:35:04 PM
Hello, I have a table for statistics where one of the columns is the DateTime when the record was added. In this moment I am sending the DateTime from my .NET code as a procedure parameter. Should I instead generate it in my SQL procedure code? How can I get the current Date and Time ...more >>



How to insert a new row into table_1 and, using the identity value of table_1, insert into table_2?
Posted by mnd3 at 2/12/2007 3:24:24 PM
Well, the subject line pretty much covers it! ;-) I am new to SQL Server (2000 at present) but have workable knowledge of Oracle and I did search but didn't find, or realized I found, what I was looking for. An insert will be done on table_1 which does have an identity column. For normaliz...more >>

Multiple Time zone support
Posted by William F. Kinsley at 2/12/2007 3:06:05 PM
I have a database that is going to need to support Multiple Time zones. I know how Oracle does this, but how can I do this in SQL Server? ...more >>

returning one single record rather than multiples
Posted by Lee at 2/12/2007 1:47:36 PM
Hiya If I had a query which returned all the instances of a value in a column, eg it returned 'M' 500 times is there a way to return this as one single record eg, 'M M M M M M M M' rather then 500 different records? Thanks ...more >>

Error Message
Posted by BipP at 2/12/2007 1:36:05 PM
Microsoft Cursor Engine error '80040e21' Multiple-step operation generated errors. Check each status value. /Easitrak2006/Form2.asp, line 158 Can someone tell me what is error is?...more >>

How to order by a table field name overrided in a select expression
Posted by Lucas Campos at 2/12/2007 1:28:57 PM
Hi, I'm making a query against a SQL server 2000 DB. My table has this structure: Table: MyTable Fields: ID, Name, CreationDate I'm my select statement I want to format the date field CreationDate to a varchar like this "Fri 9/13/2002 3:36 PM" but I'd like to order by the CreationDate ...more >>

SQL Workgroup
Posted by BipP at 2/12/2007 12:46:00 PM
Is there a limit on the number of concurrent users?...more >>

Question about ISNULL
Posted by Roy at 2/12/2007 12:38:01 PM
How to use TSQL ISNULL function with boolean values? What replacement value should I use? It can not be true or false since they are valid values....more >>

Combining a Select Column with DISTINCT
Posted by wnfisba at 2/12/2007 11:54:01 AM
Is there any way that I can get both the key contents loan number and the distinct value from a query??? SELECT CQTLOAN.LOAN_NUMBER, DISTINCT CQTPARM1.DCP_VALUE FROM CQDS50.dbo.CQT_LOAN CQTLOAN LEFT OUTER JOIN CQDS50.dbo.CQT_DECISION_PARAM CQTPARM1 ON CQTLOAN.LOAN_APP_ID = CQTPARM1.DCP_...more >>

SQL query help....
Posted by kw_uh97 at 2/12/2007 11:51:02 AM
Hello Everyone I have a sample query that works in Access and I would like to get the query to work in SQL Server 2000. I have searched the SQL Server 2000 BOL and have not found the equivalent keyword for DISTINCTROW. Can someone help me with the equivalent query that works in SQL Server 2...more >>

Does a trigger updating the same table cause a loop?
Posted by Greg Collins [Microsoft MVP] at 2/12/2007 11:24:44 AM
When I place a trigger on a table that updates that same table, will it = cause a loop (i.e. will the update from the trigger cause the trigger to = get run again)? If so, then is there a way to identify (within the trigger) which = column(s) were affected so I can break out of the trigger if ...more >>

Insert Performance VB.NET 25K / SQL Server 25K
Posted by David A. Beck at 2/12/2007 10:06:10 AM
I have a simple table in SQL Server 2005 (Std Edition SP2 on a W2K3 Server with 4GB memory) with a culstered index on it's identity column. In a VB.NET 2005 program I build a SQL statement for the insert and stack a select for the ID of the identity column before doing a command.executescalar ...more >>

SQL Script Automation Tool
Posted by Nitin at 2/12/2007 9:39:01 AM
All: I am looking into some tool that can automate all or most of the scripts that currently run through DBAs. This tool should offer some sort of notification method also per se paging in case of failure of scripts run etc. What I am looking into is automate script run portion so that DBAs...more >>

Check if record exists
Posted by shapper at 2/12/2007 9:37:14 AM
Hi, Why is this giving me an error: DECLARE @A BIT SET @A = EXISTS(SELECT * FROM dbo.A WHERE AId = @AId) I am just trying to set @A to 1 if a record exists or 0 if it does not. I am getting the error: Line 29 Incorrect syntax near the keyword 'EXISTS'. I need to do this because I wi...more >>

Schema and user Correlation
Posted by jpd at 2/12/2007 8:40:00 AM
Hello, Please forgive me, but I do not have that much experience with SQL2005 and their way of doing things - still learining. I notice that when I restore a database from SQL2000 into SQL2005, all database users are also created as schema objects. I only found this out when trying to dr...more >>

using IN search operator
Posted by obelix via SQLMonster.com at 2/12/2007 8:14:25 AM
I need to return a result set where one of the fields is in a prescribed search list. The field type is a string and the table is quite huge. Is there a better optimal way of doing it without using WHERE tbl.fld IN ()? -- obelix "Whether you think you can or you think you cant you are ri...more >>

Left Join causing column to be multiplied
Posted by cmt at 2/12/2007 8:13:29 AM
I've been working on a query all weekend, it's almost working, but I have one issue with a LEFT OUTER JOIN. I need to join two tables to get the results I need for one column(totExpenses), but the join is causing the results to be multiplied in another column(totMileage) if the left outer join...more >>

Exclusive Access / Closing Existing Connections
Posted by Aaron Sanders at 2/12/2007 7:41:01 AM
I've got a script being called by SQLCMD that needs exclusive access to a database. What are my options? Taking the database offline takes too long. It looks like the kill command might do what I want, but I'm not sure exactly how to approach it. I'm still new writing complex queries / scripts...more >>

Using Stored Procs like Tables
Posted by Matt Urbanowski at 2/12/2007 4:01:52 AM
Hi, If you have a Stored Procedure that returns a table, is it possible to use it in the same way as you can use a normal table. I mean so you can sort on it and filter on it etc without editing the stored procedure or adding parameters? Is there a way to create a view which is based on the sto...more >>

RTf data in text datatype field,please help
Posted by gd at 2/12/2007 2:49:00 AM
Hi all, I am having a text datatype field in my table and it stores the data in the form of rtf.for example the data it had stored is like '{\rtf1\ansi \deff0{\fonttbl{\f0\fswiss Arial;}}{\colortbl;\red0\green0\blue0;\red255\green255\blue255;}\deftab1134\plain\f0\fs24 \pard Muster 6761 f\...more >>

Dates UK ASP -> SqlServer
Posted by theinvisibleGhost at 2/12/2007 2:01:05 AM
We've got a piece of ASP Script which does a database upgrade from one database to another. This script is used and was created in America but we're now intending to use it in Great Britain. Ideally the script should remain identical to save having multiple copys. However we've hit an inte...more >>


DevelopmentNow Blog