Viewing 15 posts - 751 through 765 (of 1,156 total)
check your date format. I you run the code
select
CAST(DATEADD(hh, -3, GETDATE()) AS VARCHAR)
you get
Jan 30 2008 9:42AM
When you manually run it above you are using a different...
January 30, 2008 at 12:29 pm
I think you are going to have to use triggers for this one. You can get the current user by using SYSTEM_USER and the date/time using GETDATE(). The...
January 30, 2008 at 11:46 am
Your script ran perfectly fine for me. Is the BAK file in the target directory authentic or did you just rename a text file or something?
I have run into...
January 30, 2008 at 11:37 am
Another method:
SELECT a.NameId,
MIN(a.Join_Date) AS [Join_Date],
MIN(b.payment_date) AS [Payment_Date]
FROM Name a
INNER JOIN subscriptions b ON a.NameID = b.bt_id
GROUP BY a.NameId
HAVING MIN(a.Join_Date) <> MIN(b.payment_date)
January 30, 2008 at 10:49 am
Something like this?
SELECT *
FROM Name a
INNER JOIN subscriptions b ON a.NameID = b.bt_id AND a.Join_Date <>
(SELECT MIN(c.payment_date) FROM subscriptions c WHERE c.bt_id = a.NameId)
January 30, 2008 at 10:38 am
You could enable C2 auditing. C2 auditing can be detrimental to performance and is not always 100% accurate, but it provides a very robust method for tracking access to...
January 30, 2008 at 9:46 am
You can use "EXCEPT" do return all rows that exist in Name that do not exist in subscription. Using the following query will return all the Names and Join...
January 30, 2008 at 9:18 am
If you want the case to work then you are going to have to derive what the current period is. You can do this by using the same logic...
January 30, 2008 at 9:10 am
Since you only want to group by date it may be best to elimate time from the grouping all together. You can convert the date/time to a string, in...
January 30, 2008 at 8:15 am
select Roleid from Roles where Inboxenabled ='y' will return me Admin and Dev roles
How will this only return Admin and Dev, if networking is 'y' in your test data? ...
January 30, 2008 at 8:03 am
Thanks for the Reply. there is still a problem with displaying the Dates and doesnt total them up.
if the SAlesman have two or more invoices on the same day than...
January 30, 2008 at 6:53 am
Your @Period Date will always return in the current period, is this the way you want it, or are you testing the TSQL?
I response to your question, you didnt speak...
January 29, 2008 at 4:09 pm
As a side note, you can join the inserted and deleted tables on your key to get all the values need in a single query.
January 29, 2008 at 2:51 pm
Viewing 15 posts - 751 through 765 (of 1,156 total)