Viewing 15 posts - 20,866 through 20,880 (of 22,196 total)
Because you're grouping on everything, you'll get the max date for a distict select. You might want to look at something like:
SELECT c.consultantid
...
March 12, 2008 at 7:12 am
Do I have to setup a stored procedure, or just write a select satement?
Yes.
Oh, a little more? Fine.
You can do either. The preferred approach when building applications is to create...
March 12, 2008 at 6:10 am
Another question far too dense to answer in a forum like this.
However, a few pointers (and, as with everything in SQL Server, there are exceptions to every one of these...
March 12, 2008 at 6:00 am
Another variation on what everyone else has done would be this:
SELECT a.OH_DOC_TYPE,
a.OH_DOC_NUM,
a.OH_PO_NUM,
...
March 12, 2008 at 5:53 am
I doubt it's going to help, but you can call this in a cross database query. I used the example from BOL:
SELECT 'Index Name' = i.name, 'Statistics Date' = STATS_DATE(i.object_id,...
March 12, 2008 at 5:48 am
Nope. Not through anything available in the system for your basic queries. There is a way to output status on restores & backups & such.
March 11, 2008 at 12:12 pm
You can do this:
INSERT INTO MyTable1
DEFAULT VALUES
Then, with that, you can capture the values you inserted like this:
CREATE TABLE #Id ( id INT )
INSERT INTO onecolumn
OUTPUT inserted.id
...
March 11, 2008 at 12:09 pm
It means your joins are probably returning more than one row from one of the tables. That's a pretty normal occurrence when using left joins. I'd first investigate the data...
March 11, 2008 at 8:45 am
Bloody hard and tedious work awaits.
You have to update all the data and find the different variances for the company names. Worst possible problem to have. Follow the steps outlined...
March 11, 2008 at 6:51 am
I think Sarvash hit the issue with the single quotes.
Instead of "3/3/2008" in your SQL code. It should be '3/3/2008'
Single quotes define a string, not double quotes, in TSQL.
March 11, 2008 at 6:46 am
That's a huge collection of really fundamental questions that just aren't going to be answered easily in a little post in a discussion group.
In terms of database design, you should...
March 11, 2008 at 6:42 am
Yeah, Brandie is right, kick your monitor "accidently" across the room. Keep Mr. Murphy happy!
I am definately going to try the "Fear is the mind-killer" chant next time we're deep...
March 7, 2008 at 9:33 am
Ah, well, that makes sense then. Still, I think you'd be able to avoid the scan. Look at the execution plan and see what criteria are being used by the...
March 7, 2008 at 9:30 am
TheSQLGuru (3/7/2008)
Brandie, you are totally off the mark. Do whatever you can to make the most money so...
March 7, 2008 at 9:18 am
Viewing 15 posts - 20,866 through 20,880 (of 22,196 total)