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 > october 2007 > threads for wednesday october 3

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 31

finding CASE
Posted by Ant at 10/3/2007 11:19:01 PM
Hi, I need to return any record that is not upper case in a column. e.g SELECT * from table1 WHERE col1 <> UPPER(Col1) or something along the lines of this Is there anyway I can do this? Thanks very much for any suggestions Ant...more >>


Application Roles in SQL Server
Posted by Richard Mueller [MVP] at 10/3/2007 10:25:33 PM
If I use an application role to manage permissions in an SQL Server database, the permissions acquired from the application role "remain in effect for the duration of the connection". In my VB6 application I plan to create a public ADO connection object once, then open and close it as needed...more >>

How can I update two or more columns in c# string?
Posted by trint at 10/3/2007 9:57:51 PM
Here is my code that works with one column updating, but I just want to do the same thing, but with two columns updating: strSQLUPDATE = "UPDATE users SET default_billing = " + Class1.usersIDMaxID2.Trim() + " + quantity " + "WHERE id = '" + Class1.usersIDMaxID.Trim() + "' ...more >>

How to move MSSQL database to Oracle for a single customer?
Posted by Bo Berglund at 10/3/2007 9:13:35 PM
We have a big industrial automation system developed during many years using MSSQLServer, which we are very satisfied with. Good stuff! But now we have this big potential customer who has an IT policy in place that all databases in the organization *must* be Oracle based... We are now asked to...more >>

Specify Processor to use
Posted by Agho at 10/3/2007 6:47:04 PM
I have a server with four processors and I am running SQL 2005. When I run querries on the server and view process utilization, only one of the processor is being used. How can I direct SQL to use the other processors in running specific queries? Thanks...more >>

newbie: T-SQL code doesn't recognize table column
Posted by R.A.M. at 10/3/2007 6:27:19 PM
Hello, I am learning SQL Server 2005 (Express Edition). I have created a table and trigger on it. The problem is that primary key column is not recognized in the trigger (syntax error). Here's the table definition: CREATE TABLE [dbo].[Documents]( [DocumentNumber] [dbo].[DocumentNumber] NO...more >>

Clustering Disadvantage
Posted by CLM at 10/3/2007 5:43:03 PM
I just read this about clustering - see below. It might take five minutes or longer to restart an instance normally, so doesn't that take away a lot of the advantage of a cluster? Plus, isn't there the risk that if a significant transaction was going on, you'll have to do a rollback and reco...more >>

Math problem on T-SQL
Posted by David C at 10/3/2007 5:28:53 PM
I have an UPDATE command that is giving me the wrong result. Can someone look at it and see what is wrong? If I do the math with a calculator it comes out correct. UPDATE dbo.RepairOrderTasks SET Cost = ROUND(((MinutesWorked / 60) * PayRate) * ((BurdenedRate / 100)+1),2) WHERE DateEnter...more >>



where are the index stored in SQL SERVE 200
Posted by at 10/3/2007 4:45:24 PM
Hi where are the indexes stored in SQL SERVER 2000? In 2005, I this works but not in 2000 SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'dbo.TABLENAME') AND name = N'IndexName' Thanks ...more >>

Oracle Linked Server
Posted by NigelA at 10/3/2007 3:50:46 PM
I am using OPENQUERY() to update and insert records into an Oracle linked server. The inserts are very slow because they are committed one at a time and Oracle is rebuilding the primary key every time an insert occurs. The updates are satisfactory for the volumes as they are subsecond. I canno...more >>

Localization design question
Posted by Jon at 10/3/2007 3:03:35 PM
This is more a design than a programming question, I guess, but I hope someone can shed some light on the subject for me. I understand how to localize forms when all the strings are in the res file, but what about when some strings are in a database. For instance, say you have a datagrid that ...more >>

openxml and xpath
Posted by Arne Garvander at 10/3/2007 2:46:01 PM
What am i doing wrong below? declare @ClustersXML as varchar(500) DECLARE @hdoc INT -- handle to XML doc set @ClustersXML ='<clusters><cluster>500</cluster><cluster>400</cluster></clusters>' EXEC sp_xml_preparedocument @hdoc OUTPUT, @ClustersXML SELECT cluster FROM OPENXML (@hdoc, 'clus...more >>

Problems getting records from a stored Procedure into a recordset
Posted by Karl Fuchs at 10/3/2007 2:43:48 PM
Hello, I Built a stored procedure for searching records in different tables. It is used as recordsource of a ADODC-Control (first a recordset is created). The problem ist, that opening the sp in SQL-Server, I get the reords as I want - calling it from VB6 I get an Error if I try to move thro...more >>

NULL
Posted by roblowein at 10/3/2007 12:26:15 PM
I have a SQL report ... and all is fine. However there are some NULLs returned as expected. To make the report look better I would like the NULL to be replaced by " " or 0 .....how can this be done ? Regards Rob ...more >>

change the time part
Posted by rodchar at 10/3/2007 12:26:00 PM
hey all, i'm using the GETDATE( ) function but I want to change the time to 12:00:00 AM. Can someone please show me the best way to do this? thanks, rodchar...more >>

SQLServer 2005
Posted by george2233691 NO[at]SPAM yahoo.com at 10/3/2007 12:04:59 PM
I want to update the first 100 rows of a table that meet a certain criteria. update table1 set column1 = "sample" from (select top 100 from table1 where column1 = "test") this table has 500 records that meet the criteria, but I only want to update the first 100. update doesn't appear to...more >>

Help with this query
Posted by John Wright at 10/3/2007 11:51:06 AM
I have been try to get this to work with no luck. I have the following output from a query: Period Segment Region Prod_Line IND Element Obj Act 2007-08-01 EFB EFB PWR Warranty 85.7 0 2007-08-01 EFB EFB PWR Warranty ...more >>

Problem with WHERE
Posted by roblowein at 10/3/2007 10:44:47 AM
Hi All, I am having a problem with WHERE statement. The SQL below will return only data with JobMain.Cust with 139 if the lines below it are commented out. The problem arises when the other lines are added .... I then get all CustIDs.... Please can you help ? SELECT JobMain.JobNo,Jo...more >>

Add contraint to table with VIEW with SCHEMABINDING using it
Posted by Erik G at 10/3/2007 10:44:42 AM
Is it possible to add a contraint to a table that is being used in a view (WITH SCHEMABINDING) ALTER TABLE SWITCH statement failed. The table 'Table1' has view 'Table1' with schemabinding. [SQLSTATE 42000] (Error 4937). can you do this withought dropping and recreating the view? thanks ...more >>

Complex query to combine records
Posted by JML at 10/3/2007 10:00:01 AM
I have a table that contains three fields (UserID, Question_Name, Answer) It has one record for each question answer combination that the user provides in a form. UserID - Decimal Question_Name - nvarchar(128) Answer - nvarchar(50) I would like to query this table to give me one record/ro...more >>

Pulling my hair out
Posted by John Wright at 10/3/2007 8:35:44 AM
I have been battling this reports for a long time now and I can see the end (I hope). The reports are imported from an excel spreadsheet into a table (definition follows), and when I run a simple query I get the following results: PERIOD SCENARIO SEGMENT CPM Region Prod_Line Product Warra...more >>

Not-Locking on Insert
Posted by S at 10/3/2007 6:57:39 AM
I have a table that is highly used in select statements. It is used for selecting 24/7 but I need to insert data on a regular basis 5 to 10 a day in large chunks 18,000 to 200,000 records. To keep the select fast I am removing records that are a month old because they are not relevent any mor...more >>

Who is the last person updated a record of a table.
Posted by AliRezaGoogle at 10/3/2007 4:51:49 AM
I want know which user last updated an arbitrary record of an arbitrary table. Is there any way? ...more >>

How to retrieve all records from 30th record to 50th record of a table?
Posted by AliRezaGoogle at 10/3/2007 4:49:00 AM
I have a table named myTable. It is sorted by some column and there is no primery key or unique column.I want to retrieve all records from 30th record to 50th record. How can I do this by a sql statement? ...more >>

SS2K5 Express and Pro Together On One Dev Box
Posted by Smithers at 10/3/2007 12:15:00 AM
I develop full-time using SQL Server 2005 Professional. I am about to start a new project for a client in which I'll be migrating a tiny tiny database from MS Access97 to SQL Server 2005 Express. My question: I don't want to install anything on my dev box that I don't have to... so can ...more >>

Join on float and varchar
Posted by kurt sune at 10/3/2007 12:00:00 AM
We have a "standard" system. Since it is a "standard" system the quality is very low. Now I need to do a join in that system.. Unfortunately the columns that the join is on is defined in one table as float, in the other table as nvarchar(30). What about - let sql server do the conversion...more >>

Complex query
Posted by Roger Whitehead at 10/3/2007 12:00:00 AM
(Well, it's complex to me...) I have two tables; 1) People - which has a many-to-one relationship with 2) Family [People] has a PK[peo_personid] and a Foreign Key [peo_familyid] from the [family] table I'm trying to get a query output of one record per family, roughly as follows --Be...more >>

Select * from a table based on a select distinct column value from the same table
Posted by Steve at 10/3/2007 12:00:00 AM
Hi All I am using SQL Server 2005 I need help with the following... I have a Table 'Productitems' and I want to return all columns and rows from the table where the 'Item' column is distinct The 'Item' column has many duplicates as the 'Subdescriptor' column differentiates the produc...more >>

dropping snapshots
Posted by Roy Goldhammer at 10/3/2007 12:00:00 AM
Hello there I have database i need to delete as part of installation I can't do it because someone has made snapshot on it How can i remove the snapshots ...more >>


DevelopmentNow Blog