Viewing 15 posts - 1 through 15 (of 18 total)
One big reason for doing this is concurrency. If you have a large number of transactions where the same proceedure can be called multiple times in a short period of...
September 21, 2007 at 9:58 am
In your simple table this should provide the results you need. Maybe somebody has a more elegant solution.
SELECT
'One EndPoint',
September 17, 2007 at 5:32 pm
Sounds like you need to do a left join to the user scores table and use ISNULL to default the missing values to 0. Try this out and see...
September 15, 2007 at 8:14 pm
I don't know how it would be possible to move teh table with all data except for creating the table in the new database and then inserting the data into...
September 14, 2007 at 2:37 pm
Try putting your calculation in the where clause, not the aliased column name
Select a.order_number, a.customer, qty_in_stock = stock_calc(<param>
From Orders a
Where stock_calc(<param>
September 5, 2007 at 4:21 pm
You can get an Id of the stored procedure by using the @@ProcID value and then quering sysobjects to get the name.
August 29, 2007 at 1:52 pm
Do you have the latest service pack? There was an update I think in SP2 that allowed you to create a new query window or open a new file and...
August 24, 2007 at 9:17 am
Not sure how to get it, but can you change the password using sp_password?
August 16, 2007 at 11:05 am
In order to roll back a transaction, you need to begin the query with begin transaction. Without a begin transaction, SQL automatically commits the transaction when it is done running...
August 10, 2007 at 3:13 pm
What does the value 1177091222608 represent? I can see some errors in the code but not sure how to fix it.
You are looking for a value of @k...
August 8, 2007 at 4:53 pm
If they are unique, can you either SELECT DISTINCT or GROUP BY to remove the duplicates? Other options is to place the records in a temp table and only insert...
August 8, 2007 at 3:09 pm
Just join to the teams a second time using the AwayTeamID in the join. You will need to alias the table to tell them apart.
SELECT tblSchedule.*, HomeTeam.teamName as HomeTeam, AwayTeam.TeamName AS...
August 7, 2007 at 4:37 pm
Books Online mentions Parameter Markers and this sounds like it is what you are looking for.
From BOL for SQL Server 2000:
Parameter markers are supported by the ADO, OLE DB,...
August 7, 2007 at 11:54 am
You could write your query like this
SELECT db.Server_Name, db.Database_Name, db.Size
FROM DatabaseTable db
JOIN (
select server_name, max(size) as size from tableA group by server_name
) tbl
ON db.Server_Name = tbl.Server_Name
AND db.Size =...
August 7, 2007 at 11:06 am
How about
SELECT TOP 1 ItemId,UserId,Max(EffTime) as ETime FROM ItemAuditTrail WHERE NewValue ='Matched' GROUP BY ItemId,UserId ORDER BY EffTime DESC
This will give you the first record with the largest time value.
August 2, 2005 at 12:19 am
Viewing 15 posts - 1 through 15 (of 18 total)