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 2005 > threads for monday october 24

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

Merging Tables Query Help!!
Posted by Adam Knight at 10/24/2005 11:29:53 PM
Hi all, I have the two tables (parent - child) i want to merge into one. 1) myTableA - id - name 2) myTableB - id - name - parent (references myTableA.id) 3) myTableC - id - name - parent The contents of myTableA & myTableB are the table...more >>


Error "Lock Request Time Out" when deleting a record
Posted by Yulius Sutanto at 10/24/2005 7:50:19 PM
Hi all, I'm trying to delete one record from application but I get an Error : "Lock request time out periode exceeded (37000) was experienced when deleting a record from dbo.fe9srjh". I'm using SQL Server 2000 SP3. What should I do ? Thank's a lot .. rgds, yulius ...more >>

Calling a UDF from ADO
Posted by brian at 10/24/2005 7:47:02 PM
Can you call a User-defined Function directly from ADO or ADO.NET or do you have to wrap it in a stored procedure. I would test this but can't right now - sorry. thanks...more >>

Interview question
Posted by brian at 10/24/2005 6:55:03 PM
I was asked in an interview what was the fastest way to count the rows in a table? I assume that: Select count(*) from Tablename - is or is not the fastest way. Is there another way that is faster or did I miss something. thanks...more >>

Case Statement help
Posted by David P via SQLMonster.com at 10/24/2005 5:55:07 PM
I am trying to create columns from calculations. Essentially what I want is this: Column1 = A then (Column2 - Column3) as ActualAmount else Column1 = B then (Column2 - Column3) as BudgetAmount Maybe I am not thinking straight, but this seems like it should be simple. Here is what I started ...more >>

Stored procedure not displaying all results
Posted by tshad at 10/24/2005 5:14:03 PM
I have a stored procedure that does 2 selected that I read into my dropdownlists. ************************************************************ CREATE PROCEDURE GetPositionDrops3 @UserID Int AS Select CountryCode,CountryName from Country order by CountryName Select ExperienceLevelID,De...more >>

Confused By Error Msg
Posted by Wayne Wengert at 10/24/2005 5:12:59 PM
I am using a VB aspx page to pass a parameter to a stored procedure and to get two parameters returned. The input parameter is an integer, one of the output parameters is also and integer and the other output parameter is an nvarchar. When I run the execute command I get an error: Implicit ...more >>

DATETIME, DATEPART, CONVERT and Time Zones
Posted by Robert Klemme at 10/24/2005 5:12:51 PM
Hi, all my research seems to indicate that there is no correct way to get DATEPART and CONVERT to honor time zones other than the one of the server. Ideally I'd like to do something like SELECT DATEPART( hh, GETDATE(), 'Europe/Berlin' ) SELECT DATEPART( hh, GETDATE(), 'PST' ) The only ...more >>



proper or title case function?
Posted by Keith G Hicks at 10/24/2005 4:31:09 PM
I know there are flaws with this type of function (lots of exceptions to handle such as when "John Jones III" becomes "John Jones Iii" or "Detroit, MI" becomes "Detroit, Mi") and some of you might yell at me for wanting to do this type of formatting on the backend, but I was wondering if there is...more >>

Clustered Index
Posted by Hugo Madureira at 10/24/2005 4:06:43 PM
Can someone explain me what is the difference between a clusestere and a non-clustered index?...more >>

Temporary table life span in a job
Posted by John J. Hughes II at 10/24/2005 3:52:25 PM
I understand that temporary table start with # are session specific and ## are global. I also understand the temporary tables declared in a stored procedure are dropped at the end of the stored procedure. Now I have a job that declares a temporary table would that table fall in the session...more >>

Problem: getting an index provider to work with SQL Server 2000
Posted by Max Motovilov at 10/24/2005 3:44:16 PM
Hi all, I am trying to get the SQL Server 2000 to use the indices implemented by my custom OLE DB provider to optimize the joins. Basically, here's what I want to achieve: 1. My provider exposes a table indexed by 1 column ($REF) via IOpenRowset. Essentially, the rowset it provides is a uni...more >>

Inner Join vs Embedded SQL
Posted by Des Norton at 10/24/2005 3:26:08 PM
Hi NG I am busy designing a SP where I will need to filter a selection from 2 tables. The resultset will return +/- 300K records. As a rule of thumb, which of the following select statements would be quicker? Are there any other select statements which may improve efficiency? The...more >>

Optimizing a hidious query...
Posted by Brian Henry at 10/24/2005 2:43:29 PM
I have the following query... /****** Object: Stored Procedure dbo.BENESP_JournalEntrySearch Script Date: 4/23/2004 11:45:30 AM ******/ CREATE PROCEDURE [DBO].[BSP_JournalEntrySearch] @Type int = null, @User varchar(50) = null, @EntryState int = 2, -- 1 open, 0 close...more >>

How to join only one line from another table?
Posted by James Ma at 10/24/2005 2:34:03 PM
Hi, I used the pubs sample db and following sql to get all publisher's all titles. select p.pub_name,t.pubdate,t.title from dbo.publishers p inner join dbo.titles t on p.pub_id=t.pub_id order by p.pub_name,t.pubdate Can anyone tell me the 2 best sql's to solve following questions: Q1: I ...more >>

n tier development strategy question
Posted by Chad at 10/24/2005 2:27:22 PM
I don't know where to post this question-or maybe its a comment and I am just looking for reactions. We are developing a multi-tiered web app where all database access goes through a Business Object layer which resides on a machine that is not the db server. I am trying to develop the Bu...more >>

How can I cycle thru a textfile and delete all of the matching records in a MSSQL Table
Posted by Mark Moss at 10/24/2005 2:19:55 PM
Ladies / Gentlemen I need to get a code sample of how I can cycle thru a textfile and delete all of the matching records in a MSSQL Table. Thanks Mark Moss ...more >>

Re: can't see error log
Posted by Kevin at 10/24/2005 1:56:57 PM
sorry, I mean sql server log. "Kevin" <pearl_77@hotmail.com> wrote in message news:... >I tried to browse to my error log from EM, it's frozen. > why? > > ...more >>

can't see error log
Posted by Kevin at 10/24/2005 1:55:51 PM
I tried to browse to my error log from EM, it's frozen. why? ...more >>

NT Login data
Posted by Matt Benvenuti at 10/24/2005 1:55:06 PM
HI all! I need to grab the NT user name, date/time, and maybe Host PC ID of a user who logs in to a SQL Server application using a SQL Server login account. We've purchased an ERP app and must use SQL Server login to access the app. Any help greatly appreciated. cheers, Matt...more >>

Use Case with Count Distinct?
Posted by Chuck at 10/24/2005 1:20:02 PM
This isn't working the way I expected... COUNT(CASE WHEN writtenflag = 1 THEN CustomerID ELSE 0 END) AS [Writ#] doesn't get me an error message. Count(distinct customerid) also works. For some reason, COUNT(DISTINCT CASE WHEN writtenflag = 1 THEN CustomerID ELSE 0 END) AS [Writ#] r...more >>

changes to bcp arguments in sql server 2005
Posted by shelly at 10/24/2005 1:01:04 PM
Hello All Seems the arguments have changed for bcp in sql server 2005(CTP). -T use to be for the trusted connection now it is text or image size. There are new arguments like -V[security_option] and -Z[security_mechanism]. Does any one know how to use these new parameters and if you can st...more >>

Isolation Levels Revisited
Posted by Mike Labosh at 10/24/2005 12:57:32 PM
CREATE TABLE dbo.KeyRangeLockTest ( ID INT NOT NULL IDENTITY (1, 1) PRIMARY KEY, Name NVARCHAR(10) NOT NULL ) GO INSERT INTO KeyRangeLockTest (Name) VALUES ('Albert') INSERT INTO KeyRangeLockTest (Name) VALUES ('Bob') INSERT INTO KeyRangeLockTest (Name) VALUES ('Chris') INSERT INTO KeyR...more >>

Cannot resolve collation conflict for equal to operation.
Posted by Anita at 10/24/2005 12:20:11 PM
I'm trying to audit our sql server and getting a collation error. "Cannot resolve collation conflict for equal to operation." I know 3 of the databases on this server have a different collation, but I need to find a way to get around this since I can't change the collation because they are ve...more >>

What happens when I request a lock?
Posted by Jan Eliasen at 10/24/2005 11:25:20 AM
Hi What happens if I do the following: select * from MyTable (TABLOCKX, HOLDLOCK) I see a couple of options: 1. If no other transaction has a lock on MyTable, then I will get the lock and can continue. 2. If another transaction has a lock on MyTable, then what heppens? 2.1 I will wa...more >>

Transaction Isolation Level
Posted by Mike Labosh at 10/24/2005 10:58:35 AM
How do I find out what the default setting is, assuming my application / T-SQL does not specify it? -- Peace & happy computing, Mike Labosh, MCSD "When you kill a man, you're a murderer. Kill many, and you're a conqueror. Kill them all and you're a god." -- Dave Mustane ...more >>

Lost DBO
Posted by Chaia at 10/24/2005 10:52:17 AM
My sql server is showing the dbo as an owner but is nto showing up as a user or a role in my database. It was there at one time. Not sure why its not now. Any suggestions? ...more >>

a simple Query help
Posted by ChiWhiteSox at 10/24/2005 9:46:10 AM
Hi everybody! i need anybody's help in a query im trying to build here's the table intID nameID name address projectid projectnam ----------------------------------------------------------------------------------------------- 1 1 ...more >>

the way of the learning SQL Programming(Sql 2000)
Posted by C.B at 10/24/2005 9:40:06 AM
Hi everyone ! Althought i have an experience in various areas of IT including programming, I decided to change my career path these days and want to be the DBA. so i am going to focusing on the MS-SQL. Actually I already have experience in SQL but not very strong. especially programin ar...more >>

parse incoming mail content and attacthments into tables
Posted by roger NO[at]SPAM springloose.net at 10/24/2005 9:06:13 AM
I'm fairly new at this, so I'm not sure if this is a simple task or not. I've only been able to find desktop applications on doing this and that's really not the way I want to go. What I'm trying to do is this: We have a program that sends email in a templated format (always containing the...more >>

How to read IIS log files to get the hit count and distinct users information?
Posted by Naresh at 10/24/2005 8:50:58 AM
Hi All, I am trying to read IIS log file to find out the hit count of the application and also to find the user base (number of different users who access our application). Log files are created on a daily basis. I am using DTS package to import IIS log files into the database but I am f...more >>

Query
Posted by TS at 10/24/2005 8:17:05 AM
Hi all, I created a query in Access that I want to convert to SQL. The query is a little complicated and I tried to work out the differences between the two engines in terms of the functions I used. Still I'm getting error messages regarding the ROUND function. Please Help!! Create proc st...more >>

start/finish date with value,bucketized to evenly spaced time inte
Posted by DapperDanH NO[at]SPAM nospam.nospam at 10/24/2005 6:52:06 AM
I have a table that each row is an "interval" with a "value". As an example, #02-01-2007# to #10-01-2007#, value of 7.9). I need to translate this row into a table that looks like this: 2007 Qtr1, 7.9*(2/3) 2007 Qtr2, 7.9 2007 Qtr3, 7.9 2007 Qtr4, 7.9*(1/3) The original table has mi...more >>

Getting SQL Server NIC Mac Addresses in SP
Posted by gfricke NO[at]SPAM gmail.com at 10/24/2005 6:32:58 AM
How can I get the MAC Addresses of all the NICS in a SQL Server box either through code (VB .Net) or a Stored Procedure? I know the winmgmts is something that can allow this but I am not familiar with SP programming, and think that is the best way to go since I don't want to worry about authen...more >>

Database Restores; Terminates Abnormally
Posted by Ghulam Farid at 10/24/2005 4:56:38 AM
Hi to All! i have data base restore problem. i have backed up data base with verify the backup option last week now i have server crash and i have two recent backups with me. When i restore the latest one it terminates abnormally. when i restore the other backup it restores okay. what may be ...more >>

NCHAR vs NVARCHAR
Posted by Manish Gaur at 10/24/2005 2:59:02 AM
In one of the tables i have a column that will always store a single unicode character. Now , according to theory i should go with NCHAR(1) . But i would like to know what is the disadvantage of using NVARCHAR(1) instead of NCHAR(1) in this case ? is there going to be any extra overhead ? T...more >>

Union All sp results
Posted by Madhivanan at 10/24/2005 2:06:40 AM
Is it possible to union all the results of two sps without using a table? Exec sp1 'param' Union All Exec sp2 'param' Madhivanan ...more >>

To find whether the current login is a SA
Posted by SQL novice at 10/24/2005 1:59:47 AM
How do I find the current login is a system administrator login? Is there a stored procedure to find this? something equivalent to this select * from syslogins where sysadmin = 1 AND name = 'Login' ...more >>

Use of sub queries in a select statement
Posted by Pogas at 10/24/2005 1:42:04 AM
Dear All, I have a table where I wish to use sub queries to select each of the three scores for a contract with a unique projectkey as aliases. An example of the output for the query should be like this: returning only two rows from the record Contract Score –A Score ...more >>

Joining tables
Posted by Henry at 10/24/2005 12:21:03 AM
Hi I would like to join two tables, one containig the names of loaded datafiles and the date of the loaded datafile i a field called RealDate. The other tabel is a table containg a list of all the "missing" datafiles which for some reason wasn't loaded into the database. The result I wou...more >>


DevelopmentNow Blog