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) > february 2006 > threads for february 22 - 28, 2006

Filter by week: 1 2 3 4

Converting Traceid issue
Posted by michael via SQLMonster.com at 2/28/2006 8:41:59 PM
Hi, I am trying to automate a SQL Trace via a stored procedure and a job. The job executes the stored procedure to start the trace and every 15 minutes, the job is supposed to stop the trace, clear it from memory, rename the trace file, and start a new trace so I can select the average duratio...more >>

Optimizing a JOIN
Posted by rkershberg NO[at]SPAM gmail.com at 2/28/2006 6:15:41 PM
I have two tables. One has approx 90,000 rows with a field .. let's call in BigInt (and it is defined as a bigint data type). I have a reference table, with approx 10,000,000 rows. In this reference table, I have starting_bigint and ending_bigint fields. I want to pull out all of the refe...more >>

Reasonable to assemble FullName W/ A UDF
Posted by wackyphill NO[at]SPAM yahoo.com at 2/28/2006 2:57:13 PM
I break somone's name in a table in fields as First, Last, Middle, Suffix. Is it reasonable to use a UDF to create the full name as a string if I need it, by passing it the First, Last, Middle, & Suffix fields? Is this really slow to do? It's just sometimes I want to do a GroupBy Query and ...more >>

restore sql 7db to sql2000
Posted by sarahlin NO[at]SPAM yahoo.com at 2/28/2006 1:47:07 PM
Hi there, we tried to restore a sql 7 DB to sql2000, somehow some of the varchar filed become nvarchar, why is this? thanks, -sarah ...more >>

Group By Query Help
Posted by wackyphill NO[at]SPAM yahoo.com at 2/28/2006 1:28:36 PM
Can you group by a value returned by a UDF? Example: SELECT Col1, SUM(Col2), MyFunc(Col3, Col4) AS 'MyResult' GROUP BY Col1, MyResult I've had no luck. Can this be done? ...more >>

How to avoid cursors
Posted by sjoshi at 2/28/2006 10:36:18 AM
I have a long sql batch that does this: 1. Gets a list of all tables in user database that start with name CORE declare @tablename varchar(30), @command varchar(2000), @cnt integer declare GetCOREOids cursor for select sysobjects.name from sysobjects where ( OBJECTPROPERTY(s...more >>

Create New Table advice
Posted by aplatfl at 2/28/2006 7:04:16 AM
I am creating a table that will store my companys annual punctuality scale. What is the best way to name the columns? Here is some sample rows with data. -------------------------------------- DPT_CODE_1 | 300 | 121 | 120 | 61 | 60 DPT_CODE_2 | 360 | 241 | 240 | 121 | 120 Thanks for any ad...more >>

page life expectancy=0
Posted by Marek Wierzbicki at 2/28/2006 12:00:00 AM
In my MSSQL server 2000 sp4, in performanece monito, buffer memory, page life expectancy is equal to 0.00000 (average for 10 sec, auto update). I think sth is wrong configured, but what? Marek ...more >>



sqlservr.exe memory usage
Posted by Raziq Shekha at 2/27/2006 7:47:55 PM
Hello All, On all of my SQL servers (2000 with SP3), when I go to task manager and look at memory usage, sqlservr.exe is always at 1.7gigs. If I reduce the maximum to let's say 1 gig it will go down to 1 gig. But if it is even at 2gigs or 3 gigs it will be showing 1.7 gigs. Why? Is is ok...more >>

Simple SQL Distinct...!?
Posted by NO[at]SPAM sh at 2/27/2006 2:29:22 PM
This may be a really simple question, but I always have problems with Distinct queries. In this instance, I have a table of Delivery addresses, some will be exactly the same EXCEPT for the DeliveryID field, but eitherway I need the DeliveryID so that I can pass it onto the next form. So,...more >>

Error using UPDATE statement
Posted by solidsna2 NO[at]SPAM gmail.com at 2/27/2006 12:22:26 PM
Hi, I am relatively new to SQL. I am using SQL 2000. I am trying to Update a field base in a criteria in a scond table. UPDATE Tbl1 SET Tbl1.Row2 = '1' WHERE Tbl1.Row1 = (SELECT Tbl1.Row1 FROM Tbl2, Tbl...more >>

Script SQL 2005 database to individual files?
Posted by Ted O'Connor at 2/27/2006 9:46:15 AM
I am trying to script the DROP(IF EXISTS) and CREATE for all of my tables, views, stored procs, and functions to individual SQL text files (one per object). This was trivially done in SQL 2000 with Enterprise Manager, but when I try in SQL 2005 through Management Studio my only "script mode" op...more >>

Send 2 SQL statements using Integrated services
Posted by Traveller at 2/27/2006 9:13:40 AM
Hi All , I am hoping some can help or point me in the right direction. We have recenlty installed SQL 2005 and are using integrated services using ole db connections. We are connecting to an Informix database. My questions is there a way I can pass through multiple sql statements when I cre...more >>

Automating record selection parameters
Posted by Edgar at 2/27/2006 8:43:59 AM
Hi, I need some advise on how to automate record selection on a stored proc. Here is my situation. I have a stored proc that I used on Crystal reports with two parameters - Acctcode and Subacct. When a user enters ' *' on these parameter, it means to report on all accounts otherwise, repor...more >>

tools for analysis relations
Posted by stemond79 NO[at]SPAM gmail.com at 2/27/2006 1:29:31 AM
Are there tools for SQL2k database that take a database return all relations of tables. thanks. Stefano. ...more >>

International Settings for SQL 2000
Posted by quinto at 2/25/2006 2:27:13 PM
I will doing an installation of MS SQL 2000 that will be used by multi language web sites. The languages are Japanese, German and of course English. Currently I'm planning to install MS SQL 2000 standard version but after reading some articles I'm considering the Enterprise version. Can som...more >>

advice
Posted by gjb at 2/25/2006 1:54:42 PM
Hi, Apologies if this sounds dumb but I'm very new to this. I'm just trying to create a simple login page ( http://aarkenuk.co.uk/barnesg/login.php) In my MySQL databases I have the correct database selected, but it's the users I'm struggling with. You get like a front end with my hosting s...more >>

unknown column 'state' in field list
Posted by Nospam at 2/25/2006 4:44:45 AM
I installed a script that is suppose to accept paypal, however on trying to test a payment, I get this error msg: Error Database access error and I get this error msg emailed to me: Unknown column 'State' in 'field list' Query: 'INSERT INTO `TransactionsMembership` (ID, Sum, State ) ...more >>

DELETE FROM - Somethings not right
Posted by nnelson at 2/24/2006 9:09:10 PM
I have a base customer table of 2 million records. We're doing some testing and I added 33000 rows incorrectly. No biggie, we'll just delete them, right? Nope....9 hours later, process is still running using this query. delete from customer where custid in (select custid from #tmp1) k......more >>

Question about Joining 2 tables??
Posted by Wing at 2/24/2006 4:51:55 PM
Hi everyone, I have problem to join 2 tables together to show the selected results into a datagrid. table1 hosts all customer personal information. table2 hosts all the trasaction records for each customer table1 has fields such as "customerID", "CustomerName" and "TelNumber". (customerI...more >>

Fields in my tables are disappearing!
Posted by Kevin Audleman at 2/24/2006 11:42:39 AM
I am using a hosted MSSQL 2000 database that powers the backend of my website. Website visitors interact with it via ASP pages I have developed. I also have an internal FileMaker 7 database that periodically synchs with it via Filemaker's ODBC functionality. Several times now, I have come in o...more >>

Subquery -> slowness
Posted by jim_geissman NO[at]SPAM countrywide.com at 2/24/2006 11:29:22 AM
I have some queries that involve subqueries to select the appropriate record from a bunch of candidates. For example the following, which selects the most recent transaction for a given customer: CREATE TABLE #Customer (CustID int, OtherInfo int) INSERT #Customer SELECT 1,7 INSERT #Customer ...more >>

log/log10 functions truncate my resultset
Posted by BernsteinVsTheDb at 2/24/2006 10:30:36 AM
Hello all, I have a table that contains 100+ rows. I'm trying to run a query that looks like this: SELECT ..., log10(...) as Rank FROM Table and the resultset contains only the first row of results. SELECT ..., log10(...) as Rank FROM Table ORDER BY Rank returns no results at all! If yo...more >>

median query without using function
Posted by uspensky NO[at]SPAM gmail.com at 2/24/2006 9:09:19 AM
I have a table (cars) with 3 fields: VIN, Class, sell_price 101, sports, 10000 102, sports, 11000 103, luxury, 9000 104, sports, 11000 105, sports, 11000 106, luxury, 5000 107, sports, 11000 108, sports, 11000 109, luxury, 9000 i need to write a query that WITHOUT USING A FUNCTION wil...more >>

Linked Server SQL to SQL
Posted by tim.pascoe NO[at]SPAM cciw.ca at 2/23/2006 12:29:35 PM
I am currently trying to set up a linked server between two SQL-Server 2000 servers. I have a number of linked servers to other machines, which use local accounts and work fine. However, in this particular case, I am forced to use my domain account to log into the remote machine. My account has ...more >>

linked data bases
Posted by paul Borowski at 2/23/2006 12:21:56 PM
We recently copied(replicated) a data base for development. everything went well until yesterday we had rows start to disappeared in the source data base. I then found out that the rows disappearing from the source data base were being deleted from the database copy and this was being replica...more >>

long SQL lines for osql
Posted by pb648174 at 2/23/2006 7:29:00 AM
We have a very long and complicated SQL script which we run to upgrade a version of our software from old to new. It works great in Query Analyzer, but when run through osql it takes errors on lines that are very long and (I think) stops reading after a certain amount of characters. I've searche...more >>

How to create SELECT?
Posted by staeri NO[at]SPAM gmail.com at 2/23/2006 2:42:35 AM
I have the two following tables: tblProject: ProjectID 5001 5002 6001 6002 7001 7002 tblProject_type: ProjectTypeID ProjectIDFrom ProjectIDTo A 5000 5999 A 7000 7999 I need to create a SELECT statement which shows all...more >>

copy a table
Posted by Marcin Zmyslowski at 2/23/2006 12:00:00 AM
Hello all! How to copy a table in MS SQL Server 2000 without chaning a structure? I mean, I have one table, which has autoincrement numeric field (ID). When I copy this table by exporting this table into the same database folder I loose the specification of the field ID. Now it is not autoincr...more >>

Script needed to edit open objects in Sybase
Posted by News East at 2/22/2006 6:10:34 PM
Currently I must manually complete the following commands to set a new value for the "open objects" and "open indexes". I need a way script this process in a batch file. COMMANDS RAN: This is nothing to script, these commands obtain the current values for open objects and open indexes. ...more >>

SQL command needed to edit table data
Posted by News East at 2/22/2006 6:09:31 PM
I have an existing SQL 7 server named HHARBR. HHARBR has a database named SPR with a table named "reportname" in it, the table has the name HHARBR embedded the table data. I migrated the HHARBR database SPR to a second server called HHARBR2. When I look into the table in HHARBR2 I still see...more >>

Joing Multiple Columns
Posted by Crumb at 2/22/2006 4:46:31 PM
Hi All, Bit of a newbie question i'm afraid, so sorry if this is a really stupid question, I am not sure if I am trying to do this in the right place as I am sure SQL Server has a far better way of doing this What I am trying to do is join the contents of several columns and present the ...more >>

Virtual Servers cannot connect to host PC Database
Posted by sunstarwu NO[at]SPAM yahoo.com at 2/22/2006 4:33:48 PM
Hi, On my laptop I am running Virtual Server 2005 with 2 x Windows 2003 Servers. Both the VS can access the internet and shared files on the host laptop. On the host laptop I have a SQL Server 2000 running. I have written a Windows Service to detect Application Errors and fire duplicates of...more >>

Tricky SQL question
Posted by Erich93063 at 2/22/2006 2:25:58 PM
Ok so I'm gonna attempt to explain my problem as easy as I can. I have a database of contacts (they are actually vendors). I am writing a procedure that will query the vendors and generate a tab delimited file that will be used an accounting program (MYOB). In the vendors database I am exporting...more >>

select statement returns null in stored proc
Posted by Beowulf at 2/22/2006 2:24:13 PM
If I run this statement in Query Analyzer, it properly returns 1 for my testing table. But if I put the statement into a stored procedure, the stored procedure returns NULL. What am I doing wrong? I suspect it may be related to how I defined the parameters for the stored procedure. Perhaps my...more >>

Setting a value for a boolean
Posted by KR at 2/22/2006 11:12:58 AM
Hi, I am trying to get a 0 or 1 depending on the sucess or failure of a t-sql statement, and here is what I have: Declare @boolDatabaseExists bit Declare @chvnNewDatabaseName nvarchar(260) SET @chvnNewDatabaseName = 'NewDatabase' SET @boolDatabaseExists = ( SELECT (1) FROM maste...more >>

UPDATE Statement Involving Tables in Different Databases
Posted by Altemir at 2/22/2006 6:53:43 AM
I want to create an UPDATE statement that updates a value in a table in database A based on the results of an inner join between tables each residing in deifferent databases. What is the correct syntax for doing this? The following should give you an idea of what I'm trying to do: UPDAT...more >>

Backup users
Posted by Kittikun at 2/22/2006 6:07:48 AM
I am currently using the BACKUP DATABASE method to backup my database. Everything works fine, except for users. I created various users with sp_addlogin to access this database and they are located in the xlogins table. The problem is for example, if I backup, remove some users and do a restore,...more >>

Merge Replication
Posted by Chris Rennert at 2/22/2006 2:55:53 AM
Hello all, We were just getting started on a small project using SQL Server Express on our PC's and we already had SQL Server 2k Enterprise on our main Server. Problem is , we cannot do merge replications between the two. From what i have read this is not possible, but it blows my mind, ...more >>


DevelopmentNow Blog