Viewing 15 posts - 121 through 135 (of 161 total)
If you cannot get the small time increments that you are looking for by simply using datepart(ms, @timer, getdate()) then why not loop around your code say 100...
December 17, 2002 at 9:27 am
Correct, adding a Primary Key to a table also adds and Index to that table.
However, when you add a Foreign Key constraint it will not automatically add an index for...
December 16, 2002 at 9:06 am
BillyWilly, if you are looking for a solution to your problem then Greg gave the solution in his first post.
If you are looking to just bitch about the TSQL language,...
December 13, 2002 at 2:24 am
With regard to your question about the Insert trigger...
The trigger will fire before the Insert is committed since it is permissable to rollback the insert operation should the inserted record(s)...
December 11, 2002 at 5:14 am
Since you are looking to return 2 values, I would suggest the use of an SP with 2 OUTPUT params rather than a UDF.
December 10, 2002 at 8:06 am
If your data is still held in Access2000, then you could create a Query in Access then output it direct to Excel. (There is an export to Excel command in...
December 6, 2002 at 9:57 am
In order to prevent SQL from changing this to an INNER JOIN you need to specify the criteria in the JOIN and not the WHERE clause.
Try this.....
select a.*
from table_1 a
left...
December 6, 2002 at 7:52 am
It is possible to pivot data using the case statement.
If the columns are known, you can use this.
select shopid,
sum(case receiptcode
when 1 then amount
else 0
end) as receipt1,
sum(case receiptcode
when 2 then amount
else...
November 29, 2002 at 3:31 am
....sorry, had to edit comment above to LEFT join instead of INNER join.
November 28, 2002 at 9:36 am
Try this
select s.memID, s.Gender, s.Age,
case when o.memID is null then 0 else 1 end as Online
from memSearch s left join memOnline o on s.memID = o.memID
Edited by - paulhumphris...
November 28, 2002 at 9:34 am
The CHARINDEX method is also being performed on every row of your table and is unable to make use of any indexes since it is non-SARGable. (i.e. calculated)
If you didn't...
November 28, 2002 at 4:46 am
BKelly's suggestion (in the other parallel forum) of using the following...
SELECT FullName
FROM Users
WHERE CHARINDEX(fname, @Param1) > 0
...is flawed in that if 'john' is in the search @Param, the results will...
November 28, 2002 at 3:20 am
In addition to my reply above you may also need to ensure that you have apostrophe's around the text values in your @Param1 variable.
Something like this should do it....
SET @Param1...
November 28, 2002 at 3:17 am
Try using dynamic SQL.....
ALTER PROCEDURE dbo.StoredProcedure1
@param1 varchar (1400)
AS
DECLARE @sql varchar(8000)
SET @Param1 = 'joe,john,jay'
-- if using pipe delimiters include a replace statement
SET @Param1 =...
November 28, 2002 at 2:52 am
Viewing 15 posts - 121 through 135 (of 161 total)