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 > june 2007 > threads for tuesday june 5

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

retreive duplicate - urgent
Posted by vanitha at 6/5/2007 9:53:01 PM
Hi I want to retreive duplicates table report_id sched_id ID13 ID14 ID15 61 1458 COUNTRYWIDE SUPER EAGLE NO 61 1478 CAPITOL SUPER EAGLE NO 61 1450 COUNTRYWIDE SUPER EAGLE NO now sched_id 1...more >>

Urgent
Posted by vanitha at 6/5/2007 9:34:02 PM
Hi I want to retreive duplicates table report_id sched_id ID13 ID14 ID15 61 1458 COUNTRYWIDE SUPER EAGLE NO 61 1478 CAPITOL SUPER EAGLE NO 61 1450 COUNTRYWIDE SUPER EAGLE NO now sched_id 1...more >>

urgent
Posted by vanitha at 6/5/2007 9:27:03 PM
Hi I want to retreive duplicates table report_id sched_id ID13 ID14 ID15 61 1458 COUNTRYWIDE SUPER EAGLE NO 61 1478 CAPITOL SUPER EAGLE NO 61 1450 COUNTRYWIDE SUPER EAGLE NO now sched_id 1...more >>

SQLDUMPER.exe
Posted by Andre at 6/5/2007 9:08:05 PM
Does anyone know how to stop the SQLDUMPER.exe utility from generating dump files? A consultant came in and turned it on and left without telling us how to stop it. Any help would be greatly appreciated. Thanks....more >>

Error in CREATE TABLE
Posted by Curious at 6/5/2007 7:59:20 PM
Hi, I have a SQL statement as below: CREATE TABLE SystemParameter (SystemParameterID DTTypeID, SystemParameterName DTOptionName, SystemParameterValue DTOptionValue, AgentID int, Threshold int, CheckOrNot int, ErrorText DTObjectDescription) But I've got error as below: Warni...more >>

SQL Query taking 4 Mins to run
Posted by Bill Schanks at 6/5/2007 7:28:21 PM
I have this query: SELECT (SELECT MAX(AsOf) FROM dbo.t_CCY_Positions) AS AsOf, S.System, P.SEI_Account_ID, C.CCY_Cd, C.CCY_Name, IsNull(TranBal.TranAmt,0) AS TranAmt, P.Shares AS SEIBalance, Cast(P.Shares - IsNull(TranBal.TranAmt,0) AS Money) AS Diff FROM dbo.t_CCY_Positions ...more >>

How write INNER JOIN, etc instead of using =?
Posted by Ronald S. Cook at 6/5/2007 7:10:04 PM
How, please, do I write the following but with full compliance to the ANSI-92 standard (or whatever it is)... i.e. with INNER JOIN, LEFT OUTER JOIN instead of *=, etc. SELECT * FROM Lot l, LotOwnerCompany loc, OwnerCompany oc WHERE oc.OwnerCompanyID *= @OwnerCompanyID AND oc.Ow...more >>

Best optimal table design for parent-child tables
Posted by zwieback89 via SQLMonster.com at 6/5/2007 6:45:50 PM
Hi, I in the process of building an IT web site. I am building a table for the navigation menu. What is the best optimal design for the table? What I have now is: HOME NEW Hires Checklist IT Groups IT News and Announcements Monthly Group Meetings Content Management IT Bragging Boa...more >>



Couple of update statements
Posted by Rob at 6/5/2007 5:08:24 PM
How would you wrte the following update statements ? Update a column that strips leading zeros Update a column that strips any trailing Alpha characters Thanks, Rob ...more >>

varchar verses char
Posted by Bob at 6/5/2007 3:49:40 PM
Please clarify for me. With nvarchar and varchar, my understanding is that the storage space required is dependant on the actual size of the data being inserted. That being said, what is the downside of using nvarchar(50) as opposed to nvarchar(500)? ...and aside from the 1 byte used for s...more >>

disabled triggers on a table.
Posted by nkg at 6/5/2007 3:31:07 PM
how can i find triggers which are only enabled on table t1. ? thx create table t1(id int,c1 int) go create trigger t1_ins on t1 for insert as select count(*) from inserted go create trigger t1_upd on t1 for update as select count(*) from inserted go alter table t1 disable trigger t1_...more >>

creating a stored procedure using a stored procedure
Posted by PJ6 at 6/5/2007 2:24:10 PM
Is is not possible to use one stored procedure to create another in a different database? Server: Msg 111, Level 15, State 1, Procedure CreateProc, Line 9 'CREATE/ALTER PROCEDURE' must be the first statement in a query batch. I thought ";" was enough to separate the batch? Any workaround, o...more >>

SQL Server 2005 & Access 2007 Project
Posted by Ed at 6/5/2007 2:22:01 PM
Being new to SQL 2k5 & Access 2k7 is there a way to create an ACCESS project that would allow you to dynamically connect to one of many databases that are stored on my SQL server. I know that you can create at DSN-less connection and refresh the liked tables if you create an ACCESS databa...more >>

Perf Mon
Posted by CLM at 6/5/2007 11:56:00 AM
I am in a new position and at my new workplace, there are a variety of people that log into the Sql Servers. (2000 specifically) How can I keep Perf Mon up and running? Whenever someone logs out, won't they kill whatever Perf Mon log that I've set up?...more >>

how to create StoredProcedures with variable WHERE condition?
Posted by Xavier at 6/5/2007 11:21:03 AM
Hello, i have problem with the creation of a stored procedure with a variable where condition. I have to return the values depending on the where condition which is created on a web UI. The parameter are p1_vendor p2_productType p3_ABC Between the 3 parameter are a AND condition exam...more >>

Unavoidable high loading - table scan or UNION ALL?
Posted by tanya.wang NO[at]SPAM gmail.com at 6/5/2007 11:13:24 AM
I have two identical tables (NEW and OLD) that records lots of stats and the memberID is the only one index key to search. MemberID is a non-clustered index on NEW and OLD. We have about 80,000 members, which means the NEW has about 80,000 entries and the OLD has about 140,000 entries since it...more >>

Data Transfer
Posted by Shyam at 6/5/2007 10:58:02 AM
Hi, I'm looking for methods in SQL Server 2000 to transfer the DB from Server 1 to Server 2 which should be done on daily basis. But i would consider doing it in the fastest way. As far as i know can be done using Replication (consumes more resources) so i would not prefer, robocopy, xcopy ...more >>

unable to use 'copy database'
Posted by Mike at 6/5/2007 10:51:08 AM
I'm trying to move my 20 SQL 2000 Databases over to SQL 2005 via the Copy Database wizard. Currently I'm testing this out on my local computer. When I enter my source database server I connect, but when I enter in my servername\instance for my destination I get an error 'Unable to connect to ...more >>

How to make an icon with MSSQL 2005 status to appear in System Tray
Posted by josephsaft NO[at]SPAM yahoo.com at 6/5/2007 10:47:59 AM
Help Needed! After the installation of MS SQL 2005 standard Edition I was expecting an icon showing the server status to appear in the system tray but it did not show. How to make it to appear in System Tray? I was looking thru the help but to no avail. Thanks in advance, Joseph ...more >>

combine multiple select statements into one
Posted by jgong at 6/5/2007 10:16:30 AM
Hi, I have a table with two columns and the following data: Flag Value f1 v1 f2 v2 f3 v3 Each flag name is unique. And I'm executing multiple select to find the flag value: select @value1 = value from table1 where flag='f1' select @value2 = value from table1 whe...more >>

Maximum number of tables (260) exceeded
Posted by Walt H at 6/5/2007 10:13:00 AM
Hi! I receive the referenced message when i run a view I created in SQL2005 in a SQL2000 install of the same database. Basically it is a union query with about 9 individual select queries. I am sure this has something to do with a lack of efficiency in my query structure but I am confounde...more >>

Removing Duplicates from a table
Posted by R C at 6/5/2007 9:54:00 AM
hi, i have a table that has 10 fields. (A, B, C, D, E, F, G, H, I, J). there is a constraint on the table to enforce unique in the fields (A, B, C). i have a staging table that contains the same fields without the constraint. this table contains duplicate data and I need to query out all the ...more >>

Alter statement
Posted by nkg at 6/5/2007 9:44:49 AM
I have an SP. which needs to be deployed to production. Am i better off using Alter statement or drop and recreate. Will alter statement preserve permissions on the object? thx ...more >>

How come COUNT(*) increases as I purge the database table?
Posted by Curious at 6/5/2007 8:47:00 AM
Hi, I'm in the process of running a stored procedure to purge a huge EventLog table. Before the purge, there were 52,000,000+ rows. Now it seems that there are more rows as the purging is in process. When I select COUNT(*), I'm surprised to see this count increases each time as time goes go. ...more >>

Syntax errors in a stored procedure
Posted by Curious at 6/5/2007 8:24:21 AM
Hi, I got errors about "@liError " and "ErrorHandler" not declared when running a stored procedure below. For Heaven's sake, I declared both loud and clear. The errors are where the comments are. Anyone can tell me what's wrong? -- Drop the old table IF OBJECT_ID('dbo.#TmpSystemParameter')...more >>

Updating new column using a subquery
Posted by RuthE at 6/5/2007 7:04:03 AM
I have a table Regions with the RegionID and RegionState. I am trying to add a new column so that when I run my query I get a total sales for that region. I understand I have to use a correlated query but I am not making the connection between the inner query to the outer query in order to pas...more >>

Datetime conversion
Posted by RuthE at 6/5/2007 6:58:02 AM
I am trying to pull a list of customers that did not place an order during April 2000. When I run my query I get back the following message: The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value. Why? SELECT C.CustomerID,C.CustomerName FR...more >>

Counting Text Bytes
Posted by wnfisba at 6/5/2007 6:49:00 AM
Isn't there an internal function to T-SQL which will actually coiunt the bytes in a text field type??? Thanks in advance. wnfisba...more >>

ALTER/DROP/ADD syntax confusion
Posted by CharlesA at 6/5/2007 6:19:03 AM
hi folks, I'm using SQL server 2005 and I'm trying to drill myself into remembering how to CREATE, ALTER, DROP constraints, indexes, foreign keys, add columns, alter columns all that kind of stuff I hate books online (sorry for the purists out there but i find them over-verbose and confusi...more >>

Could not find database ID 104. Database may not be activated yet or may be in transition
Posted by ganesh at 6/5/2007 2:29:41 AM
Hi There Why the following one works in one server not other one, i had a error message like this Server: Msg 913, Level 16, State 8, Line 28 Could not find database ID 104. Database may not be activated yet or may be in transition. UPDATE Holdings SET Holdings.Rec...more >>

Modification time pf stored procedures
Posted by Xavier at 6/5/2007 1:54:01 AM
Hi, is there a possibility to display the last modification date of all stored procedures from a database (sorted desc)? Thanks, ...more >>

Collation Issue
Posted by Simon Woods at 6/5/2007 12:00:00 AM
I've just come up against the issue of the tempdb's collation can end up being different dependent upon whether you SELECT INTO or CREATE TABLE. I was wondering whether there was a function I could call on certain columns of the SELECT INTO which would force the collation to be something ...more >>

warehouse table design
Posted by Alex at 6/5/2007 12:00:00 AM
Hello (sql server 2000) I have to build a table that holds warehouse information It should be letter of cell (a,b,c,d,....) and number of cell (1,2,3....300) , isempty (bit default =0) How would you create a table to hold such info like give all empty cells under letter cell 'a'? ...more >>


DevelopmentNow Blog