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 > april 2006 > threads for sunday april 23

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

Join?
Posted by Brad Baker at 4/23/2006 11:15:54 PM
I have the following two tables of data: Answer QuestionID CustomerID ------ ---------- ---------- Answer1 15 5090 Answer2 14 5090 Answer3 ...more >>


How to compare just the Date portion of DateTime fields
Posted by RonL at 4/23/2006 8:53:13 PM
What's the best way to compare just the Date portions of datetime fields (ignore the time) lateFlag = case when TargetEndDate is null then 'N' when TargetEndDate < getutcdate() then 'Y' else 'N' end Ron ...more >>

Problem with stored proc syntax
Posted by DavidCur at 4/23/2006 8:10:02 PM
Hi all, This is going to turn out to be something painfully simple, I'm sure... but I've looked and looked but can't see the problem. I need fresh eyes to check it for me, but my fellow DBA is on leave at the moment. This is a proc I'm writing to purge log backup files used in log shippin...more >>

Duration Problem
Posted by scott at 4/23/2006 7:56:40 PM
I inherited a very nasty db that I need to get the duration between matching types. I'm not sure if this can be done in SQL, but first I need to pair the "Start" and "End" records. In the DDL below, each "Start" record has a type 1 and the "End" record is type 5. The End record usually foll...more >>

Trapping errors from stored procedure into a file
Posted by sudhakar.upadrasta NO[at]SPAM gmail.com at 4/23/2006 7:53:06 PM
Hello All, I am using a stored procedure as part of my logic implementation in SQL Notification Services application. Sometimes, most likely a data issue, this procedure fails to execute. As this whole procedure is executed in transaction, if any error occurs, I am not able to view the con...more >>

SQL Query Inner Join Question for SQL 2005 Express
Posted by Herbie at 4/23/2006 5:51:01 PM
I have a question for an Inner Join. Using SQL 2005 Express. I think the results I get back is incorrect. However it is the reults I am looking for. TableA EmployeeID DeptCd FirstName LastName Det7858 IT John Doe Det7854 IT Jane Doe Det7938 IT Henry Smith Det7855 CS Jane Sm...more >>

Smart or stupid? Tying textbox length to database column length
Posted by Dan Manes at 4/23/2006 3:33:34 PM
Wondering what other people do about this issue... You're writing a web app in asp.net that requires user input. Data will be stored in SQL Server Express database. You want to make sure data does not exceed maximum length for database column. For example, "User Name" column in database is s...more >>

SQL Error, In clause
Posted by Phill at 4/23/2006 7:15:01 AM
I have a web page that allows the user to select multiple languages (checkboxes), and each value is an integer. My sp accepts these values as a varchar (ie 1,2,4) and then I use these in an IN clause. The error I'm getting is "Conversion failed when converting the varchar value '1,2' to data...more >>



how do I shut autocommit off at the database level
Posted by CaveMan at 4/23/2006 6:16:00 AM
I would like to be able to force all transaction to be implict for a specific database on SQL Sever 2005 does any know how this can be accomblished. Also if this can't be done can it be done at the connection level using ole db.. If not is there some other method that can be used. ...more >>

XPATH QUERY QUESTION
Posted by thejamie at 4/23/2006 5:50:01 AM
GIVEN AMBIGUOUS DATA: EXAMPLE CITY REGION CCODE LATITUDE LONGITUDE Suhaylah 'Ajman AE 244821 561145 Suheila 'Ajman AE 244821 561145 Masfut 'Ajman AE 244836 560634 Al Manamah 'Ajman AE 251949 560140 Manama 'Ajman AE 251949 560140 Manamah ...more >>

Programatically View / Stored Procedure with N fields
Posted by Avril at 4/23/2006 5:31:30 AM
We have a table that has 10 fields of which say 5 are either non textual. We want to have a resultant view with 7 fields, namely 1 numeric field and the 5 non-numeric fields (textual) and one additional field for the non textual field name. In the example below the last 5 field names are Prod1...more >>

join
Posted by gracie at 4/23/2006 2:15:01 AM
I need to perform a self join on a table and I need to display a specific combination of records: table contains column + data: ----------------------------- equip_length 100 200 300 400 500 I need to display a combination of each value, except I don't want to repeat a combination...more >>

Performance question
Posted by Roy Goldhammer at 4/23/2006 12:00:00 AM
Hello there I have two tables i match with them. the field i match is none clustered index. When i make INNER JOIN between them it takes less then left or right join. And inspite both of the fields have index the execution plan use hash join. Whay it is like that? ...more >>

Error 823: I/O error (torn page) detected during read at offset...
Posted by Leila at 4/23/2006 12:00:00 AM
Hi, HDD failure caused to move the data to a new disk. We are no longer able to attach the MDF file. I searched a lot but all of solutions work only when the database is running under SQL Server and is suspected, not for me (detached database). I get this error when trying to attach the MDF ...more >>

**find relations of a table**
Posted by R-M at 4/23/2006 12:00:00 AM
Hi I'm working with SQL 2000 and I want to know how can I find which tables have relationships to a particular table.in other words, I need a select statement to fetch the name of relations and foreign keys that my table has a relation with them. Any help would be greatly thankful....more >>


DevelopmentNow Blog