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 tuesday october 30

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

Real Isam database
Posted by Mark at 10/30/2007 11:15:04 PM
I develop a shareware desktop application that should work with a small local database. In my searching of a free database I came across the product "Real Isam" which is totally free for using and distribution. Does anyone have any experience with it? What are the drawbacks in comparison to S...more >>

Materialized/Indexed Views
Posted by CLM at 10/30/2007 9:55:00 PM
At my last place, they were about to use Oracle Materialzied Views to move data from a server in Europe to our servers in the US. If you want to use Materialized or Indexed Views in 2000 or 2005, could you do it with this same goal? That is, could you use an Indexed view to push data to anot...more >>

help with groupby and having clause
Posted by Hrocks at 10/30/2007 9:31:03 PM
I need to return the names of the users who have ticket types of 1 or 2 and 3. The table structure is as such Users ( UserName UserID ) TicketCat ( TicketCatID TicketType ) Requests ( UserID TicketCatID ) Here is my code... select a.UserName From Users a inner join Re...more >>

newbie question on concurrency
Posted by Danny Ni at 10/30/2007 9:06:55 PM
Hi, I have a table CampaignEntries which has fields: CampaignID ,EntryID and other, I want the EntryID to be unique and continuous starting from 1 within the same CampaignID. Here is the relevent codes I have in an SP: SELECT @NextEntryID = ISNULL( MAX(EntryID),0) +1 FROM CampaignEntries...more >>

How to get the running Job Name?
Posted by Pat at 10/30/2007 6:14:30 PM
Hi Freinds, SQL 2005 How can I know the name of the running job within the same execution ? What I mean is that if you run db_name() you will get the name of the db you are running, I have multiple jobs that are running in different time frames and I have a table to record the steps of each j...more >>

NT Account
Posted by Ed at 10/30/2007 5:24:00 PM
Hi, I see there are two account created under Security. One is NT Authority \ System and another one is NT Authority \ Network Service. What are they? Is the System account part of the Local Windows Sys Admin? How about that Network Service Account, I see it starts SSIS and SSRS. Can I...more >>

problem with join in @sql
Posted by TG at 10/30/2007 5:09:18 PM
Hi! Can this even be done this way? if exists (select [id] from master..sysobjects where [id] = OBJECT_ID ('master..temp_Source_Media_file_count ')) DROP TABLE temp_Source_Media_file_count declare @sql1 nvarchar(4000) declare @db1 varchar(300) set @db1 = 'master' declare cD...more >>

Query Help.
Posted by AF at 10/30/2007 1:47:32 PM
I have two tables, one with orders, another with users. The users can be of type 0 or 1. I am pulling out a list of all orders with the users (type 1) who have created them. However I would also like to the orders that type 0 accounts have left comments in which at the moment is only an INT. I...more >>



Count Occurances in Select Statement
Posted by Joshua A. Booker at 10/30/2007 1:33:17 PM
Hi There, I need to return a field that increments each time a certain value is found in another field of a select statement. For example: SortID Break Increment 1 # 1 2 Null 1 3 Null 1 4 ...more >>

Returning only date from datetime value
Posted by Swede.Swede NO[at]SPAM gmail.com at 10/30/2007 12:53:42 PM
Hello! I have a registrationdate field in my table. The date-field has both the date and the time. I want to do comparisons on only the date, so I need some nice code to return only the date part. Could you please help? Note: I am not interested in formatting the value, I want to strip the ti...more >>

Table Management: Speeds
Posted by Mike Sharpe at 10/30/2007 12:52:00 PM
We have a computational grid that uses a SQL Server database as a temporary storage facility. Inside of the database, I create multiple (thousands) tables that are named uniquely using GUIDs. This is done so that our gid (hundreds of computers) does not get into table contention. After it i...more >>

Many-to-Many design question
Posted by at 10/30/2007 12:09:11 PM
Assume you have 3 tables to describe a many-to-many relationship. One table contains a list of car models, a second table contains a list of colours, and the third table links models to colours to show availability. In the availability table, I can think of two implementations: 1) An entity c...more >>

select string
Posted by gracie at 10/30/2007 11:55:01 AM
I have a column that contains the following values: 1-5RAVC-0004 1-5REVX-0011 10BACV-0507 PLM177-0071 PLM177-0072 PLM177-0075 PLM177-0076 PLM177-0078 I would like to retrieve from the column everything before the hyphen - except if the - is in the second position in the c...more >>

Getting DATE + Hour in YYYY-MM-DD HH:MM:SS:MSS Format
Posted by Curtis at 10/30/2007 11:47:58 AM
Would anyone mind taking a look at my T-SQL below and tell me if there is an alternative and better way than I've found to take a DATETIME in YYYY-MM-DD HH:MM:SS:MSS format and get just the date and the hour? DECLARE @yyyy AS VARCHAR(4) DECLARE @mm AS VARCHAR(2) DECLARE @dd AS VARCHAR(2) DEC...more >>

Grouping Data based on Dates
Posted by barnwood at 10/30/2007 9:56:02 AM
Example Source Table A Col 1 Col 2 Col 3 Col 4 01/11/2007 A B 10 01/10/2007 A B 20 01/09/2007 A B 10 01/08/2007 A B 10 01/07/2007 A B 10 01/06/2007 A B 10 Example Results Table B Col 1 Col 2 Col 3 Col 4 01/11/2007 A B 10 01/10/2007 A B 20 01/06/2007 A ...more >>

Best way to handle large transaction sets.
Posted by koredump at 10/30/2007 9:22:03 AM
I working with a web application that calculates a number of formulas. One of the requirements for this app is to commit all the variables that were used to perform the calculations to db. One session can generate anywhere between 1000 and 4000 variables which have to be saved as individual rec...more >>

Database design question
Posted by Stijn Verrept at 10/30/2007 9:15:31 AM
Hi all, I have a question on how to approach a problem: Suppose you have an application in which the users can keep stock of anything. Every item has is a certain type with certain properties. For example if the user defines 'pc', he would define also the following properties: CPU, Ram...more >>

problem using OpenRowset with SP that has a #tmp table
Posted by Rich at 10/30/2007 9:08:01 AM
I use openrowset with stored procedures in query analyzer SELECT * FROM OPENROWSET ('SQLOLEDB','Server=(local);TRUSTED_CONNECTION=YES;','exec myDB.dbo.stp_test1') where fldx = 'some value' this works fine for filtering the resultset of a store procedure. But if the stored procedure con...more >>

T-SQL queries with truncate error on SQL Server 2000 and 2005
Posted by Sanchet Dighe at 10/30/2007 8:55:01 AM
I am trying to upgrade SQL Server 2000 to SQL Server 2005 Standard Edition SP2 and am in the process of analyzing the impact on the application in both 80 as well as 90 compatibility modes. I need help regarding solution to a behavioral issue between SQL Server 2000 and 2005 in the context of ...more >>

Why to use Regions?
Posted by vishnu priya at 10/30/2007 5:58:07 AM
What is the use of "Regions" in c#? EggHeadCafe - .NET Developer Portal of Choice http://www.eggheadcafe.com...more >>

Which is the best way to declare a protected instance variable?
Posted by vishnu priya at 10/30/2007 5:55:22 AM
protected System.Data.SqlClient.SqlConnection oConn; Is it the best way or I can write like this: using System.Data.SqlClient; protected SqlConnection oconn; Which is the best way and why? EggHeadCafe - .NET Developer Portal of Choice http://www.eggheadcafe.com...more >>

Optimizer can't change join order
Posted by Bob at 10/30/2007 2:12:00 AM
I understand there are certain situations in which the optimizer cannot change the join order of your tables when making a plan, for example if you use the FORCE ORDER hint. What other situations cause this? eg does the WITH NOLOCK hint, or derived tables cause this? Thanks...more >>

Parameter bug? Plz help
Posted by Per Bornsjo at 10/30/2007 12:54:00 AM
Hi! I just can't figure this one out.. I have a SP with the following definition. PROCEDURE dbo.spUpdateNumbersInSerie -- Add the parameters for the stored procedure here @Id int, @StartNumber varchar(20), @StopNumber varchar(20), @Action int AS BEGIN Print @Id END ...more >>

Finding consecutive records below a certain value
Posted by Ray Greene at 10/30/2007 12:00:00 AM
I have a table with ID, datetime and data fields. The datetimes are for every minute without duplicates or gaps. I need to create a report which will tell me if there are any periods of 3 minutes or longer in a single day where the data has been below a certain value and for how long. For exa...more >>

Import Data from Oracle
Posted by Nirmal Singh at 10/30/2007 12:00:00 AM
I have SQL server table (RecordedAbsences) with the following structure Empno, StartDate, EndDate, R_Type, Reason This is keyed on Empno and StartDate. I need to import data from an Oracle table (Attendance) with the following structure: Ref, Empno, StartDate, EndDate, R_Type...more >>

Create constraint at user-defined data types
Posted by alvin at 10/30/2007 12:00:00 AM
I would like to create a type which include constraint on it. I m encounter an error while executing the transact-sql at below Eg. (To ensure the week is between 1 and 52) create type wk7 from smallint add constraint wk7_check (wk7 >= 1 and wk7 <= 52); The system prompt me error and does n...more >>

Save xml returned from URL as local file
Posted by Mr. Smith at 10/30/2007 12:00:00 AM
Hi. I have a dataprovider which gives med data in .xml format based on me calling link like this: http://www.myprovider.com/feed/clientdata.asp?format=xml&clientid=125 How can I trough a Stored Procedure get data from this URL and store it to a local .xml file (on the SQL server)? Furhte...more >>


DevelopmentNow Blog