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 > september 2007 > threads for friday september 28

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

complex table combine multiple rows into one
Posted by vivienne flower at 9/28/2007 9:45:30 PM
Hi there I am using sql server and am very stuck on combining results from multiple tables in one row. I have multiple tables containing different information on dogs and I want one row per breed holding all of the information I need. I have created a view: dogbreedID, dog size, dog...more >>


sql question
Posted by tao tao at 9/28/2007 7:41:30 PM
Given the following tables: Refuel CarId OdometerReading LitersGas 1 1245 55.25 1 1457 16.96 1 1872 34.23 1 2193 25 1 2448 20.4 1 2508 5.52 1 2663 14.15 1 3075 41.82 1 3387 27.77 2 112145 36 2 112972 34.24 2 113357 30.03 2 113731 29.92 2 114130 36.7 2 114535 36.98 2 114943 41.4...more >>

Session activity view
Posted by Manekurt at 9/28/2007 5:05:00 PM
Hello to everyone, I need to know if there is a way to analyze the historic session activity thay were made in the server. The sys.dm_exec_sessions gives me the same information I need to get, but the problem is that this Dynamic Managament View shows only the current activity. I need to get...more >>

Good T-SQL programming book wanted
Posted by General Fear at 9/28/2007 4:12:05 PM
I need to know SQL Server programming like yesterday. I know my ANSI 92 SQL. So I am familiar with the Select's, Where clause, group by's. I got that from my Oracle PL/SQL programming. What I need help in is SQL Server programming. I need to know how to create stored procedures, cursors an...more >>

default value (0) necessary?
Posted by Justin Doh at 9/28/2007 3:59:00 PM
I have been getting error when I tried to input data using a stored procedure. Currently, I have a table that set up that allows null for this column called "nBidAmt" but it has no default value. I do have a SQL statement in ASP as follows: strSQL = "spHWARecommendationInsert1 " _ & nHW...more >>

Record matching based upon dates and duplicate field values
Posted by lacdn76 at 9/28/2007 2:32:03 PM
I am trying to do a comparison in T-SQL without using a cursor (only queries and tables because the cursor is SLOW looping through all records). What I'm trying to do is the following: I have 2 tables... The first (TABLE A) contains UniqueIDa, CancelDate, FeeKey, LocID, ChoiceKey, MatchedUnique...more >>

Leading Zeros with OpenRowSet
Posted by Matt Williamson at 9/28/2007 12:39:44 PM
I'm using OpenRowSet with the Jet provider to query a text file. The first column is a number with leading zeros. When I query it, it's truncating the leading zeros. CASTing it to varchar doesn't seem to work either. This is my test: exec master..xp_cmdshell 'echo Port Code >> c:\temp\tes...more >>

Why programmers don't like DB(A)s
Posted by Ryan S at 9/28/2007 12:33:01 PM
I found this interesting, and it spawned a ton of discussions in my programming group... http://typicalprogrammer.com/databases/programmers-vs-rdbms/ What do you guys think? -- Ryan S Sr SQL DBA 1Jn5:12...more >>



Regarding transaction and lock
Posted by Iter at 9/28/2007 10:20:01 AM
Hi Guys, I have a question regarding update and truncate. In my company, we have multithread application. In stored procedure, we have a couple of statement, first truncate a table, then insert and update. we didn't put begin tran and commit statement there. Let's say two thread access that s...more >>

Calendar/business day logic
Posted by Terri at 9/28/2007 9:49:16 AM
Thanks if you can help. I want to determine if a date is the day after the last business day of a month. Given my sample data '9/1/2007' and '9/29/2007' would qualify IF Exists --logic that escapes me here BEGIN PRINT 'It is the day after the last business day a month.' END BEGIN PRINT ...more >>

avg vs average
Posted by rodchar at 9/28/2007 9:09:02 AM
hey all, i'm taking 5 numbers and using the avg( ) function in sql vs average( ) function in excel and i'm coming up with 2 different numbers? 65,769.60 48,318.40 74,006.40 73,902.40 82,014.40 ----- 66,366.30 excel 68,802.24 sql will rounding cause that big of a difference? which ...more >>

Date diff for specific dates
Posted by James at 9/28/2007 7:52:37 AM
I am trying to get a list of all invoices, their order date, how many days outstanding(days past the order date), how many invoices are between 0-30 days overdue, 30-90 days, etc and which were ordered in our fiscal year, or last fiscal year. I can do that in access with the script below. ...more >>

print statement help
Posted by rodchar at 9/28/2007 6:34:01 AM
hey all, i'm using the PRINT statement like this: PRINT @varNumber + 'Test String' Do i always have to convert the number variable to varchar? thanks, rodchar...more >>

How to check the amount of concurrent users in a database?
Posted by OK at 9/28/2007 6:22:36 AM
How can I check (by Visual Basic) the amount of concurrent users in a SQL Server 2005 Database ? ...more >>

Use of function ???
Posted by calderara at 9/28/2007 4:57:01 AM
Dear all, I have different store procedure whcih use similar WHERE clause criteria. is it possible to paste the content of the where clause inside a function and call the function instead like : SELECT ...... FROM ..... WHERE fnMycriteria() thnaks for help regards...more >>

How to select
Posted by hon123456 at 9/28/2007 2:09:48 AM
Dear all, I have a table as follows Table A Invoice Number Location Amount 001 A 10 001 B 20 001 C ...more >>

Javascript and CDO...
Posted by Joe at 9/28/2007 1:40:00 AM
I have inherited a database and previously mail was sent using CDONTS. We need to migrate it to CDO, the only issue is I have been unable to get it to work. This is done within an extensive Javascript. It works fine if I use VBScript, however modifying that code to Javascript hasn't yielded...more >>

FK Naming
Posted by shapper at 9/28/2007 12:49:27 AM
Hello, I have 2 tables: Articles and Users. These 2 tables are related by AuthorId (FK) in Articles and UserId (PK) in Users. My question is: should the use the same name for the 2 keys, i.e., UserId? Or it is normal to use AuthorId in Articles table and UserId in Users table. This make...more >>

Date/Time querry handing ??
Posted by calderara at 9/28/2007 12:13:01 AM
Dear all, Let say that my client application run under an operating system (Vista) which is set with regionnal setting in US.Then the server that host the sql server DB has regional setting set to French. So it means that the source and the destination have different date/time format . F...more >>

logging adhoc updates
Posted by Daniel at 9/28/2007 12:00:00 AM
I need to see if there is anything we can do to help track when we have to manually execute procedures to update or correct data in our tables... There is only maybe 2 or 3 tables that we ever touch.. and its because data is entered incorrectly... So is there anything that we can do to log...more >>


DevelopmentNow Blog