Archived Months
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
all groups > sql server mseq > march 2005

Performance problem... again :(
Posted by Marco Pais at 3/31/2005 7:42:50 PM
Hi there. This is not my 1st post related with performance. I am experiencing serious performance problems with a VB6 application running over a SQL Server 2000 database. I have already used SQL Analyser, SQL Profiler and Performance Monitor to collect data that might help resolve this prob...more >>


A Challenging Query
Posted by Kaushik at 3/23/2005 10:23:01 PM
Hi EveryBody, Here is a very interesting SQL which I failed to solve. I have two tables called Main and Notes.Table notes has id field which is primary key of the Main table and foreign key in notes table. Notes table has an identity column called NotesId. What I have to do is that I have...more >>

SQL Query Analyzer
Posted by JrSnyper at 3/23/2005 9:37:09 AM
I can not get this query to work right it returns the records for the dates 03/19/2005 and 03/20/2005 but not 03/21/2005. Could this have any thing to do with my SQL Server collation set? My collation set is SQL_Latin1_General_CP850_CI_AS. Please help SELECT INV_PRICE_HEADER.cust_id, ...more >>

Help with Query and Null
Posted by Ali at 3/22/2005 1:59:36 PM
I have the following syntax Sum([SalesQty1]+[SalesQty2]+[SalesQty3]+[SalesQty4]+[SalesQty5]+[SalesQty6]+[SalesQty7]+[SalesQty8]+[SalesQty9]+[SalesQty10]+[SalesQty11]+[SalesQty12]) AS YrSales This works fine if none of the fields are NULL How can I cater for the scenario where anyone of the ...more >>

Summing Rows with certain values in return set
Posted by Jig Bhakta at 3/22/2005 8:13:02 AM
Hi, I have a query that returns a detailed resultset but I need to create a summary of it as follows: ResultSet of Detail: -------------------- ColA ColB ColC ColD 1 Email A User1 2 Email A User1 3 Phone A User2 4 Phone A User2 5 Phone B...more >>

how to get max date of a month
Posted by Hari at 3/21/2005 5:33:39 PM
hi, How to get last (maximum) date of a month through sql query. ex: if 31st is the last date of a month then i should get 31(dd) or 31/03/2005(dd/mm/yyyy) format or 20050331 (yyyymmdd) format. Thanks, hari. ...more >>

Help with Query
Posted by Newbie at 3/18/2005 1:01:23 PM
Is it possible to do this all in one stored procedure? I have 3 separate queries which returns all the correct records with Stockcode being the field to join Q1 is my main query from which I want to return all the records. Q2 and Q3 return records but not every record in Query1 will have re...more >>

Comparing two rows in a Table
Posted by Yog at 3/17/2005 10:19:02 AM
Hi Gurus, Is there any automated way to compare the contents of TWO rows in the same table of SQL Server ? Thanks in advance. Regards, Yog...more >>



Help with Where clause
Posted by Newbie at 3/17/2005 10:09:21 AM
Hi, I want to return records based on a linetype and classtype Here is what I have so far Where (LineType = '1' OR LineType = '7') or (LineType = '5'AND ClassType NOT LIKE '[_]%') I am trying to return all LineType 1 and 7 and only LineType 5 where the classtype does not start with an u...more >>

SQL code help
Posted by Nate at 3/16/2005 7:19:05 AM
I am trying to create a record number. Don't ask why LOL. Below are the items I need in my record number. Here is the format I'm looking for. I am also having problems trying to get it to display zeros before numbers such as 1. Ex. 1 should be 01. This would be stored in a text field. ...more >>

Populate Temp Table from SP?
Posted by Stingray at 3/15/2005 3:21:01 PM
I have a question that I haven't been able to find an answer to in either the help files or Technet/MSDN searches. First a little background. I have a number of SPs that pull the same basic data but manipulate it in different ways (e.g. some add address information for targeted mailing lists, ...more >>

summing up values for all rows meeting a criteria
Posted by Jig Bhakta at 3/14/2005 11:05:10 AM
Hi, I need to run a query that does the following: A table exists as such: ID (Number) Letter (VarChar) Status (VarChar) Value (int) "ID" is the unique identifier for this table. "Letter" is A, B, C, D, etc... "Status" is Open or Closed and "Value" is a number. There can be mult...more >>

Need help with stored procedure.
Posted by Vanessa Lee at 3/13/2005 7:29:30 PM
Hi, I am using SQL Server 2000 on Windows 2000 server. Here is my problem: @String = 'word1word2word3word4word5' - This value is passed to Stored Procedure from the script. Column1 in a table1 has many rows with "words" . One row in this column1 will have 'word3'. Notice that this 'word3' i...more >>

cannot insert(urgent)
Posted by shif at 3/11/2005 11:13:02 PM
Hi I am using Mssql2000 and i am facing a problem while saving data from my application. This Procedure is working fine. CREATE PROCEDURE test(@edate datetime,@supp_idv char (8),@div char(2),@dept char(3)) AS CREATE table #oi(supp_id char(8),inv_no char (15),inv_date datetime NULL,dept_...more >>

Extracting sub-string
Posted by gavin at 3/10/2005 6:47:02 PM
Hi, I have got data in a field in the following formats: 9999999_x 9999999_x_ 9999999_xx 9999999_xx_ 9999999_xxx 9999999_xxx_ 9999999_xxxx 9999999_xxxx_ How can i extract the value for 'x' or 'xx' or 'xxx' or 'xxxx' using a single query, where x can be any integer? Thanks Reg...more >>

Top Keyword with Group By
Posted by Khris at 3/10/2005 11:41:07 AM
Is it possible to retreive the Top n columns for each distinct value in the Group By? Example Table has Divisions, Customers and Invoices. I want to return the Top 10 Customers for each Division based on the Sum(Invoices). NOTE, I'm trying to do this with Data Warehouse data so the user do...more >>

hanging(urgent)
Posted by shif at 3/10/2005 9:23:07 AM
Hi I am facing a problem while saving data from my application. Actualy syntax showing below working fine.The problem is that after retrieving this report in my application,when any other user try to inserting any record into ap_spled the application is hanging and cannot insert into this ta...more >>

AWE enabled
Posted by sam at 3/9/2005 3:11:10 PM
Hi, please let me know if I enable AWE and PAE and turn on /3 GB switch, why can't I see sqlserver.exe or total/target server memory more that 2.72 GB? Event though there is a page/sec goes upto 6000. Server must need memory more than 3 GB. My email address is : atiqur_rahman02@yahoo.com or yo...more >>

Concatenating null fields in an SQL server query
Posted by Bob Boles at 3/9/2005 2:23:01 PM
I am concatenating 2 fields in a query. When one of the fields is a null value the resulting string is also null wether the other string is null or not. I have tried setting the concat_null_yields_null to off and on without any change to the resulting string. Does anyone have any ideas about w...more >>

Need to replace Tags in Ntext
Posted by 1idesigned at 3/4/2005 3:45:02 PM
How does one properly write a replace statement when I need to find and replace a number of different tags in a ntext column. I am currently using (replace(col003, 'x', '')) This only works for one character I would like to expand the replace for additional characters. Thanks in advance...more >>

Query Total Response Time
Posted by Borikoy at 3/2/2005 11:51:02 PM
How can I know the total time (in miliseconds) for my SQL Server to answer a query. I want to issue a query using an Query Analyzer and Measure the Servers total response time. Thanks in advance! ...more >>

UPDATE Multiple Records
Posted by Ali at 3/2/2005 8:23:24 PM
I want to be able to update Table1.TrnCost with Table3.UnitCost Where Table3.Location = Table2.MainLocation for eg the ABC Records in Table1 would be update with the UnitCost of 2.00 - this being the UnitCost at Location L I have tried the following but it says the subquery returns too many ...more >>

SQL ( more than one Database)
Posted by Wes at 3/1/2005 9:03:35 AM
Hi, could someone give me the syntax to communicate across 2 databases. e.g. SQL for inserting records from one database to another INSERT INTO Database1 SELECT FROM Database 2 Both databases are on the same server. I am using SQL 2000. Thanks! Wes...more >>


DevelopmentNow Blog