Viewing 15 posts - 121 through 135 (of 596 total)
There are two types of login id's in SQL Server - Windows login id's and SQL Server login id's.
A Windows login id is mapped to an operating system...
September 11, 2006 at 9:39 am
Just change the last line to:
set @minutes = DateDiff(mi, @start, @end)
September 8, 2006 at 8:55 am
Another option would be to create a batch file that runs osql.exe.
The batch file would accept the name SQL file as a commandline parameter.
September 6, 2006 at 12:45 pm
Forget the timestamp column - that does not give you the date and time when the modification occurred. It is used to indicate IF a row has been modified during...
September 5, 2006 at 10:17 am
Here's some quick and dirty code that will just print out the object name. Sorry, but I used a cursor. Since I'm assuming this is for an ad-hoc administration task,...
September 1, 2006 at 8:29 am
The [text] column in syscomments is nvarchar(4000). If the length of the text for the object is greater that 4000, it will be split into two or more rows. Be...
August 31, 2006 at 8:44 am
If I understand you correctly, Pw was on the right track, except that you've already summed [column 17] in the subquery for each distinct [Column 0], so just include o.PTO_Sum...
August 31, 2006 at 8:19 am
There are many ways to accomplish that. Here's one way:
-- First case
SELECT numdate
, CASE numdate
WHEN 0 THEN NULL
ELSE CONVERT(datetime, CONVERT(varchar(8), ((1900 + ((numField /...
August 30, 2006 at 1:12 pm
If you mean that the five parameters are compare to an associated column in a table, there are a couple of things you could do, depending on your situation. For...
August 25, 2006 at 11:07 am
What are the data types of the variables and columns? I retested the query using all int datatypes without any problems. It worked perfectly.
August 24, 2006 at 3:33 pm
INSERT INTO [dbo].[mytable]
( [CustomerEmail]
,[CapNo]
,[ImageNo]
,[Graphic])
SELECT @CustomerEmail
,@CapNo
,(SELECT IsNull(Max(imageno),0)+1
FROM [dbo].[mytable]
WHERE customeremail = @CustomerEmail
AND capno = @CapNo
)
,@Graphic
August 20, 2006 at 8:12 am
Actaully, each user gets a different #TempQueue1.
The name #TempQueue1 is a local reference to an actual table name that is much longer in length, and is unique.
However, why not try...
August 20, 2006 at 7:41 am
Here's another (but similar) way:
1. Put the SQL code in a stored procedure
2. Run osql
CREATE PROCEDURE uspCustFileOutput
AS
DECLARE @cust TABLE
(
cust_id int
, cust_name varchar(30)
)
SET NOCOUNT...
August 17, 2006 at 7:56 am
August 17, 2006 at 7:36 am
Inside the loop that processes close_cursor, there are two stored procedure calls:
EXEC dbo.usp_Close_Open_Item @LOI_Open_Item_Amt, @LOI_Lease_Open_Item_Id, 0
EXEC dbo.usp_Close_Open_Item @LOI_Open_Item_Amt, @LOI_Lease_Open_Item_Id, @SD_CRCCPP
Do either of those stored procedures use cursors? As Lowell mentioned,...
August 10, 2006 at 10:19 am
Viewing 15 posts - 121 through 135 (of 596 total)