|
Does anyone know of a good reference site for SQL Server 2005 Notification Services?
As barmey as a sack of badgers
Dude, if I knew what I was doing in life, I'd be rich, retired, dating a supermodel and laughing at the rest of you from the sidelines.
|
|
|
|
|
Are you thinking of using them? I ask because Notification Services were killed off in SQL Server 2008, which would make an upgrade path tricky to say the least.
|
|
|
|
|
Thanks Pete.. just Google'd that and as its part of the report services I might be rethinking that part that I was going to use notification services
As barmey as a sack of badgers
Dude, if I knew what I was doing in life, I'd be rich, retired, dating a supermodel and laughing at the rest of you from the sidelines.
|
|
|
|
|
Hey all,
I am still fairly knew to SQL query writing, and have searched to try and solve this by myself, however have had no luck!
I am trying to write a query that returns information from SaleInformation and File_Info, with SaleInformation including all records that match a query and File_Info returning the matching File_Name(I have a relationship between them with PID the primary key in File_Info) if the PID is a match.
However, my query is returning a result in every File_Name row return, even though I only have 3 entries in the File_Info PID column that match only 3 records in the Sale_information table. A gentle push in the right direction would be greatly appreciated!
Oh, on a side note - If I change the query to "ON File_Info.PID = SaleInformation.PID" I get the 3 records that match returned. Here is the query I have at the moment:
USE [C:\DATABASE\SALES.MDF]
GO
SELECT File_Info.File_Name, SaleInformation.PID, SaleInformation.Sale_date, SaleInformation.Sale_price
FROM File_Info LEFT OUTER JOIN SaleInformation
ON SaleInformation.Sale_price > 150000
It returns 183 rows. There are only 94 rows in the SaleInformation table and 3 in the File_Info table. I am very confused!
Regards,
Joe
|
|
|
|
|
Joe Stansfield wrote: I have a relationship between them with PID the primary key in File_Info
Perhaps you think that that will somehow automatically affect the join? It doesn't; you need to specify the relationship in the join.
|
|
|
|
|
Ahh thanks! That is exactly what I thought would happen...
Back to the old drawing board!
|
|
|
|
|
As Piebald suggest, you need the relationship in the join. You can include the filter as well but the relationship must be there.
SELECT File_Info.File_Name, SaleInformation.PID, SaleInformation.Sale_date, SaleInformation.Sale_price
FROM File_Info LEFT OUTER JOIN SaleInformation ON File_Info.PID = SaleInformation.PID
and SaleInformation.Sale_price > 150000
or
SELECT File_Info.File_Name, SaleInformation.PID, SaleInformation.Sale_date, SaleInformation.Sale_price
FROM File_Info LEFT OUTER JOIN SaleInformation ON File_Info.PID = SaleInformation.PID
WHERE SaleInformation.Sale_price > 150000
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Thanks!
I had some trouble making it work - but it all came down to simply having the tables on the wrong sides of the LEFT OUTER JOIN. Switched them around and it is return as I wanted!
Cheers for the assistance.
|
|
|
|
|
This is one of the most useful articles [^]about joins I have seen
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Thanks again!
Great article - definitely helped me understand.
|
|
|
|
|
I am using C# with MySQL..
I want to know what's the best way to save the System.Color in mySQL?
|
|
|
|
|
Try saving as argb
color.Red.ToArgb().ToString
or in HEX
color.Red.ToArgb().ToString ( "X8" )
Here [^] is a good example of serializing color. Take a look at the PIEBALDconsult's 2nd reply. Although the original thread is about returning color from webservice but still you could get an idea about it. I loved that post
|
|
|
|
|
yeah, I liked that thread too. I would however have preferred System.Color to serialize just like a simple integer all by itself!
|
|
|
|
|
Excellent answer! I was about to same the same thing.
|
|
|
|
|
How can I select a random record in mySQL,. something similar to the ORDER BY newid() in MS SQL?
|
|
|
|
|
|
|
what's the best way to save duration in mySQL..
with duration I mean 1 hour and 25minu (1:20)
it might be more than 23hours sometime... like (31:17)
|
|
|
|
|
I'd either store it as a number (in seconds), or as two datetimes.
I are Troll
|
|
|
|
|
Hi,
I would like to know what is the DBA tasks? what is he/she doing?
if I wanna be DBA do I need to start with SQL Server or Oracle? cold you please advice me how should I start? what sort of certification do I need?
|
|
|
|
|
Have you tried this? Database Administrator[^]
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
future3839 wrote: start with SQL Server or Oracle?
No. You need a broader understanding of the subject.
future3839 wrote: how should I start?
Go to school. Get a high-level understanding of all types of database.
|
|
|
|
|
I have a question, I hope this has not been asked before
But I have a stored procedure which I have to EXEC in order to get a results set, and then pop the results set into an Excel report.
Problem is, the results set is known to have 100,000's of rows. Now, I've read on Google about SET ROWCOUNT and I did the following as a test...
SET ROWCOUNT 5
EXEC ....
However, doing that gives me nothing back, not the top 5 rows of the results set like I expect. I don't want to put a TOP 5 (or TOP X you get the idea) in my SELECT inside the stored procedure because doing that will break functionality elsewhere.
I just want the top X rows right now just for testing purposes, and then when I am ready to deploy I plan to have it give me the full query (the query runs as a scripted console app on a remote server somewhere at regularly scheduled times).
Thanks for any inputs!
Sincerely Yours,
Brian Hart
|
|
|
|
|
Brian C. Hart, Ph.D. wrote: I don't want to put a TOP 5 (or TOP X you get the idea) in my SELECT inside the stored procedure because doing that will break functionality elsewhere.
Make a second version with a different name?
I are Troll
|
|
|
|
|
I did that and it worked! Thanks [ ]
Sincerely Yours,
Brian Hart
|
|
|
|