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
August 2008


all groups > sql server programming > may 2006 > threads for monday may 1

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

TSQL ELSE IF
Posted by Stuart Shay at 5/1/2006 11:20:01 PM
Hello All I am woring on parsing weather data which contains allot of columns, In my logic below is there a cleaner way this to this. Thanks Stuart @Variable = The Column Name @Tempature = The Tempature Data --------------------------- IF @Variable= 'maxt-hi' BEGIN UPDATE dbo.W...more >>

Returning Date Formats in Stored Procedures?
Posted by cider123 NO[at]SPAM hotmail.com at 5/1/2006 10:59:46 PM
Ok, so you can use MONTH, DATENAME(mm) to return Month properties. Using MONTH(...) returns the numeric value. Using DATENAME(mm, ...) returns the full month name. What if you wanted to get the Month returned to you formatted like: Apr Are you forced to return a substring of the return va...more >>

Alter table - add default value
Posted by PawelR at 5/1/2006 9:29:50 PM
Helo Group, In my database I have table : idDoc (int) IDENTITY (1, 1), UploadDate (datetime) DocName (varchar). Now I ought too add default value (getdate()) for new document. How I can use Alter table for update structure my table. thx PawelR ...more >>

Data translation
Posted by Brian Henry at 5/1/2006 9:25:21 PM
Say I have a flat file like this Name ID Type Info ===== == ====== ======= Name1 5 ABCD FirstRecord Name2 6 DEFG SecondRecord Well I want to save that into a database table like this CREATE TABLE FlatFileRecords ( ColumnID UNIQUEI...more >>

How do I design for categories, subcategories, subsubcategories and so on?
Posted by needin4mation NO[at]SPAM gmail.com at 5/1/2006 7:49:36 PM
Using SQL Server, but it's really a general DB design question. Any book, article, link, or help is appreciated. I have a catalog that has several levels of categories, some have more some have less. I'm just not sure how to have the varying levels of categories, subcategories, subsubcategor...more >>

Help! Processing Hard Coded vs. Stored Procedure
Posted by David C at 5/1/2006 6:19:01 PM
Hi All, I am just in the process of putting a script that updates a reporting table into a stored procedure and have found that when run as a SP it takes soooo much longer. Running the script in QA with the "WHERE" clauses hard coded takes around 1 min, when I attempt to run via a SP with the...more >>

Display multiple rows as one record
Posted by Mike at 5/1/2006 5:50:19 PM
Hello, I have sales history stored in a table in the following format: Customer Year Sales 1 2006 5000 1 2005 8000 1 2004 2000 2 2006 6000 2 2005 10000 2 2004 20000 Can so...more >>

Converting to crosstab table
Posted by Roy Goldhammer at 5/1/2006 5:37:24 PM
Hello there I have table with 2 fields: table1(Field1, Field2) I need to present it as crosstab in this way: Original: 1, 1 2, 2 2, 3 3, 4 3, 5 3, 6 3, 7 Should look like this: 1, 1 2, 2, 3 3, 4, 5, 6 4, 7 How can i do this dinamicly? ...more >>



DECIMAL datatype
Posted by Rick Charnes at 5/1/2006 4:12:06 PM
Can someone help me better understand the DECIMAL datatype? I've defined a column as colname DEC(9,2). I know that precision is the total number of digits, and scale is the number of digits to the right of the decimal point. Yet 'sp_help tablename' indicates that colname has a 'length' of...more >>

debugger
Posted by Lianne Kwock at 5/1/2006 3:09:02 PM
Hello, I got the following error message when I was trying to debug a stored procedure sitting on a remote sql database server. I have no problem running the debugger on the local server. It just don't work if I try to debug a stored procedure on a different server. Here is the error mes...more >>

Text change management
Posted by The Cornjerker at 5/1/2006 2:38:28 PM
I'm not for sure where to ask this so I'll start here. We have a web application that has a lot of large textareas for data collection. We need to track who makes changes, when and what changes were made. Right now I'm storing the entire text in a separate table before the changes are saved....more >>

CAN'T FULLY UNINSTALL SQL SERVER 2005 STANDARD
Posted by suslikovich at 5/1/2006 2:17:12 PM
We have a Windows Server 2003 SP1 machine with two hard drives. I installed MS SQL Server 2005 without paying attantion to where it installed to. The c: drive is very small while d: is large. SQL installed on c:. Apparentely, log files were growing and filled up all the space on c:. I couldn't a...more >>

SQL help please
Posted by SteveInBeloit at 5/1/2006 1:56:01 PM
I have a table that contains pricing information with quantity breaks. tblPrice - columns customer#, custPart# QtyLimit, Price. giventhe customer#, custPart#, and a quantity, I need to find the row that that quanity falls in to get the price. so if rows cust1 part1 100 .04 cus...more >>

Sorting Numeric Strings
Posted by ianb at 5/1/2006 1:43:50 PM
I've read alot of suggestions here about sorting numeric strings, but can't find one that fits my situation, so here goes. I need to sort strings that have dot separators. Some have 2 dots, others have 3 dots, no other combinations. The last part of each string increments as new records are ...more >>

Query Optimization NOT IN vs LEFT JOIN
Posted by mEmENT0m0RI at 5/1/2006 1:15:48 PM
I've read in many places that using "NOT IN" results in worse performance. I've got two queries producing the same result: SELECT WS.* FROM WHSLocations WS INNER JOIN WHSLocations20060428D WHD ON WS.LocationID = WHD.LocationID WHERE WS.LocationID NOT IN (SELECT LocationID FROM Repository...more >>

HELP! - SQL Mail
Posted by segis bata at 5/1/2006 12:52:24 PM
Hello every1, My question to you all is why can't I see the SQL Mail icon in the Support Services folder in my SQL Server? how (if possible) do I make that icon appear? Currently I'm running SQL Server 2000 in Windows XP Professional Thanx in advance for your help, SB-R ...more >>

Do i need primary key?
Posted by Justin at 5/1/2006 12:42:55 PM
Here is the scenario I have a table (let's call it tblTest) with 3 fields, UserID, Note, NoteEnterDate (simple one to many relationship. user can have many notes) Query would be to join it with user table and get the first and last name of the user (based on UserID) and show the Note and No...more >>

too many connections with .NET
Posted by Dan D. at 5/1/2006 12:33:02 PM
Using SS2000 SP4 and .NET 1.1. We have a .NET application that has a small number of users - maybe 15 or so. It seems like as soon as the first person logs in we have a little over 100 connections (about 108 - as viewed in SQL Server EM) and the connections never go away until we reboot again....more >>

How to read the content of a flat file in Stored procedure
Posted by sasachi sachi sachi at 5/1/2006 11:46:06 AM
Hi there, How to read the content of a flat file in Stored procedure into a variable? I am also trying to find the size of a given flat file into a variable in stored procedure. Does anybody have any ideas on these? Thanks in advance, -- Sree *** Sent via Developersdex http://www.dev...more >>

write conflict problem with InsteadOf Update Trigger
Posted by Rich at 5/1/2006 11:45:02 AM
Hello, I took over a project for which there was little documentation. There is some replication going on, but I don't know if the table am having a problem with is part of the replication process. I have a main table that is related to several other tables. The table has been usi...more >>

ExecuteNonQuery in SQL 2005
Posted by David at 5/1/2006 11:14:11 AM
I have an ASP.Net page that runs the following command which is giving me the following SQL error: The statement has been terminated. Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression. Th...more >>

update qry
Posted by bhorwitz at 5/1/2006 10:38:01 AM
How does one update an Microsoft Access table from within Sql server. For example: If the sql table has three fields, field1, field2 and field3 and the access table has three fields, Afield1, Afield2 and Afield3. So if field1=1 and field2 =Afield2 update Afield3 with the value in field3. ...more >>

Select the users in a database
Posted by xaviero NO[at]SPAM gmail.com at 5/1/2006 10:34:37 AM
What query can I use to select all the (non-system) users from a database. I need to make some changes to the account and first I would like to compare the users in the DB to a list of users (700+) that I was given. Thanks ...more >>

listing columns in view and stored procedures
Posted by Dan D. at 5/1/2006 10:23:01 AM
Using SS2000 SP4. If I create a view and list the columns in the select statement, if I then create a sp using the view is it better to list the columns again or just use '*'? Thanks, -- Dan D....more >>

Viewing table variables when debugging
Posted by Jeff Dillon at 5/1/2006 10:02:12 AM
When debugging SQL2000 stored procedures in VS2003, is it possible to view the contents of table variables? Jeff ...more >>

Stored procedure
Posted by Sandy at 5/1/2006 10:00:02 AM
Hello - I'm trying to execute the following procedure (e.g. exec spCallsAllAdminOutput 'smith', '4/30/01', '5/01/06'). I am getting an error on the dates. The datatype is smalldatetime. I need to get the value of @outparm for use in a VB 6 app. Any help will be greatly appreciated! ...more >>

TSQL Error
Posted by matt at 5/1/2006 9:42:39 AM
Hi, I am trying to do a find and replace text in a char(35) field using the TSQL below. It works fine for a memo field but I get the "Only text, ntext, and image columns are valid with the TEXTPTR function." error. I tried to cast the fdescript into a text field but that does not work. A...more >>

Delete Data from a Column
Posted by Chris at 5/1/2006 9:21:02 AM
Can someone help with the following I would like to delete all the data from a column so I can then update it with new data. Thanks ...more >>

too many connections with .NET
Posted by Dan D. at 5/1/2006 8:46:02 AM
Using SS2000 SP4 and .NET 1.1. We have a .NET application that has a small number of users - maybe 15 or so. It seems like as soon as the first person logs in we have a little over 100 connections (about 108 - as viewed in SQL Server EM) and the connections never go away. If we reboot, we get ...more >>

Scalar Functions Re-Revisited - Doesn't Concantenate
Posted by Daniel Regalia at 5/1/2006 8:20:02 AM
Happy Monday Morning from Texas. I'm having a problem with a Scalar Function.. If I pass this (100, 9) It should return 0900 (thats the desired result), instead I get 900. The wierd thing is that if I tell it the 3rd line of the Select Statement 'A' + (@pricemultiplier * @strikeprice)...more >>

Is there anything similar in TSQL to oracle code "SEQUENCE.NEXTVAL
Posted by sqlapprentice at 5/1/2006 7:56:02 AM
Hello, I trying to do a SELECT that will show me the next value automatically everytime. for example in Oracle, I can do Select SEQUENCE.NEXTVAL from Dual 1 Select SEQUENCE.NEXTVAL from Dual 2 Select SEQUENCE.NEXTVAL from Dual 3 with Oracle there is a function that allows me to use auto...more >>

Order by question, pls help
Posted by Jean at 5/1/2006 7:17:01 AM
Hello, I need to sort my data by location name, but the first record I need to return is the one with location "Corporate" and then location name from A-Z. How can I use order by to return "Corporate" records first and then return "Atlanta", "Boston"...? Thanks in advance!...more >>

Help with query! Ranking of Sum() column
Posted by andymilk NO[at]SPAM gmail.com at 5/1/2006 7:07:49 AM
If anyone can help with this, I'd be most appreciative. Basically, I'm trying to sum a column based on a unique ID and then find out the RANK of that record in the table. Here's the table: Points - PointID - UserID - Points There can be multiple records with the same UserID. Here'...more >>

BCP : Format File : Second Question
Posted by Russell Mangel at 5/1/2006 6:24:42 AM
Before answering this question please read my previous post 10 minutes ago. Assuming that I have to use a Format File with bcp to export a table that has a column I don't want exported. What Format File should I create in order to achive the following two goals: I wish to create the smalle...more >>

BCP : Format File : Export Table
Posted by Russell Mangel at 5/1/2006 6:06:18 AM
Hi, I have a table in SQL Server 2005 that has the following 3 columns: Companies Table ============================= CompanyID CompanyName rowguid ========= =========== ======= I wish to bcp the table out to disk file, but I don't want to export the rowguid column. Do I have to spec...more >>

Running the Genereate sql script by code
Posted by Roy Goldhammer at 5/1/2006 12:00:00 AM
Hello there On some databases i have collation problem. To solve it I: 1. backup the database 2. restore it in a diffrent name 3. generating all the tables in the database include all properties 4. opening the file created on query anlyser and removing all collate words. 5. running the sc...more >>

looking value in table
Posted by Roy Goldhammer at 5/1/2006 12:00:00 AM
Hello there I have huge table with at least 20,000,000 records, On that I have Field1 who has unique values. The same value sometimes shown on the same table on Field10 but not on the same record and it isn't unique. i need to build query that returs all the records with Field1Who exist...more >>

Getting size of table
Posted by Roy Goldhammer at 5/1/2006 12:00:00 AM
Hello there IS there a way to know a size of parent table? (structure and data) ...more >>


DevelopmentNow Blog