Viewing 15 posts - 61 through 75 (of 109 total)
Hi,
Can you please provide some more information?
Some dummy data and the DML required to reproduce the problem you are trying to solve would be most useful.
Cheers,
Jim.
March 13, 2012 at 10:59 am
Hmm..
There may be a way to do this using triggers etc.. But you can also do it by running a schedule every x minutes to check for blocking.
Create a teble...
March 13, 2012 at 10:33 am
Hi,
Is there no way to parametrise the text file name?
osql.exe -E -SPERRY-PC -dMASTER -Q"EXEC SP_HELPDB" > C:\SQL\TEST {INSERT PARAMETER HERE} .TXT
December 23, 2011 at 2:16 am
Hi there..
For this kind of task you're going to need a dates table. This simply has every day from a predefined start date, to a predefined end date. So it...
December 22, 2011 at 7:57 am
Ahhhh I see...
I assume you're in the US? There's a fantastic one for the UK based on an ordinance survey. That I can link you to if needed?
Try this site...
December 16, 2011 at 8:29 am
With Option B you will have to deal with SQL Server compiling the procedure every time you execute it as there may have been changes to the SPs within the...
December 16, 2011 at 7:54 am
It may be possible to do what you're after in a query, but without any sample data or DDL it makes things difficult for us.
Try this for help: http://www.sqlservercentral.com/articles/Best+Practices/61537/
Sounds like...
December 16, 2011 at 7:51 am
Hi,
Are you just looking to output the values??
CREATE TABLE #product (
ID INTEGER IDENTITY,
Product INTEGER NOT NULL,
Price MONEY NOT NULL,
Quantity INTEGER NOT NULL
)
INSERT INTO #product
SELECT 1,1.75,10
UNION ALL
SELECT 1,1.75,15
UNION ALL
SELECT 1,1.75,20
UNION ALL
SELECT...
December 15, 2011 at 7:58 am
This is why I love SQL so much, you have one single set of criteria that must be fulfilled and an insane amount of ways to write the code 😀
December 14, 2011 at 1:45 am
Thanks for looking into a bit more deeply Cadavre.. I've been working with SQL Server for 5 years now and have literally never had anyone else look at my code...
December 12, 2011 at 4:38 am
Hmmm... I have to disagree with you, as I ran the query after adding in your new user and got the below results:
id ...
December 9, 2011 at 9:58 am
I fear there's been a certain amount of 'scope creep' in this request..
Also, this query will return different results each day. For instance, if nothing changes for the next week...
December 9, 2011 at 2:10 am
Hi,
Given the criteria:
All users:
a: that have been active during last 6 months
b: that only have jobs that are older then 6 months,
c: that are not marked as inactive,
d: that have...
December 8, 2011 at 10:36 am
Could you please provide us with some sample data so we can more easily assist you with your query?
EDIT: Also if you uncomment the --COUNT(REQUESTS.reqid), won't that give you your...
December 8, 2011 at 9:01 am
You need to wrap the whole statement in your WHERE clause in some brackets and then take the modulo.
Try this..
SELECT DISTINCT userid, YEAR(GETDATE())*365+MONTH(GETDATE())*30+DAY(GETDATE()) -
((CASE timeendyear WHEN 9999 THEN YEAR(GETDATE())...
December 6, 2011 at 8:24 am
Viewing 15 posts - 61 through 75 (of 109 total)