Viewing 15 posts - 376 through 390 (of 1,217 total)
"There are 28 fields to be inserted. 15 fields make up primary key. Only 2 fields are summed the rest are inserted as is."
Maybe I didn't understand it correctly, but...
July 12, 2007 at 7:37 am
"...servicenames and some other generic data to be returned and grouped by distinct accountID"
"there are an average of 27 serviceNames per account ID"
Now I'm at a loss how to...
July 12, 2007 at 6:30 am
Well, since I have no idea what is in the function and the tables, I can't guarantee that this will work... but it should give you at least general idea:
SELECT...
July 12, 2007 at 1:27 am
Sorry for splitting it into 2 posts... now a hint at the solution, using the Dates and Status tables (I also had to add a date column to your simplified...
July 11, 2007 at 9:30 am
Prepare permanent auxiliary table (also called "tally table") of all relevant dates, if you don't have it yet:
CREATE TABLE Dates (number INT, date_char CHAR(10) NOT NULL, date_dt datetime
CONSTRAINT PK_cislo PRIMARY...
July 11, 2007 at 9:11 am
Hi,
I have to repeat my question : what about dates within specified range, when there are no rows at all - do you want to display these days with all...
July 11, 2007 at 8:52 am
Chris is right, if you supply a value directly (i.e. it is the same for all rows), you don't have to include it in GROUP BY clause.
July 11, 2007 at 8:32 am
Hi Jay,
I think that you'll need to add another query (or probably 2 queries) to get these summary rows. Then you can use UNION if you want that it appears...
July 11, 2007 at 8:25 am
Oh and one more thing... maybe you don't need to branch (IF something...) at all :
INSERT INTO #Log (RecordType, RecordsUpdated,FirstEncDt,LastEncDt)
SELECT CASE WHEN COUNT(*)=0 THEN 'No records updated' ELSE 'Some other...
July 10, 2007 at 2:23 am
First, I would recommend changing this:
SELECT TOP 1 SampleUnit_ID FROM #Sps
IF @@ROWCOUNT...
to:
IF EXISTS (SELECT * FROM #Sps) /or NOT EXISTS - depending on what you are checking/
And the insert -...
July 10, 2007 at 2:20 am
Hi,
what I would recommend is creating a new table Status(code INT, description VARCHAR(20)) - I suppose you don't have it, otherwise you wouldn't have to assign values in CASE. Then...
July 9, 2007 at 2:41 am
Hello,
just a few questions before we can start thinking about a solution...
How do we know which row should get which number (of the 1 - 4000)? Or is it...
July 9, 2007 at 2:25 am
We have already suggested several ways. Did you try them and found unsatisfactory? If so, say why, so that we know better what your main problem is.
To sum up, offered...
July 4, 2007 at 8:17 am
To be honest, I don't think it makes sense at all... A report with 90 columns is bad idea. Do you think anyone will be able to work with it...
July 4, 2007 at 6:01 am
It probably means that you supply less parameters than what was defined for the procedure. This is possible only if the missing parameters have a default defined.
Also, especially if...
July 4, 2007 at 3:22 am
Viewing 15 posts - 376 through 390 (of 1,217 total)