Viewing 15 posts - 6,856 through 6,870 (of 15,381 total)
adonetok (9/12/2013)
How to post ddl?I list the sample data and result I need again as below.
Come on...this isn't the first time we have asked you for ddl and sample data....
September 12, 2013 at 9:59 am
adonetok (9/12/2013)
No, this result is not right.If I use this query, the result is not same as I expected.
Then maybe you should post ddl, sample data and desired output so...
September 12, 2013 at 9:48 am
Your trigger does not support multiple rows correctly. If you have more than 1 row in inserted you will only have a single value in your variables. You need to...
September 12, 2013 at 9:47 am
Can you post the entire trigger code? I don't see in this trigger any reference to inserted or deleted. I also see a bunch of variables. That gives me a...
September 12, 2013 at 8:47 am
This should work.
where doctype = 1
or doctype = case @dt when 1 then 2 end
September 12, 2013 at 8:44 am
You don't need a bunch of steps for this. A simple query (that you pretty much wrote) will do this in a single step.
select ID, min(DATEFROM),max(DATETO),Color
group by ID, Color
September 12, 2013 at 8:36 am
Happy to help. You might want to read up on APPLY.
Paul White has a 2 part series that is the best I have read on the subject.
September 12, 2013 at 8:21 am
Jack Corbett (9/12/2013)
below86 (9/12/2013)
September 12, 2013 at 8:15 am
It would be a lot easier is you would provide ddl and sample data in a consumable format. Also, you should try to avoid reserved words for object/column names (all...
September 12, 2013 at 8:11 am
DBA12345 (9/11/2013)
Hi I want to update Flag column in second table based on the Adder names.
If the Applicatiion has atleast one AIX and Adder name is UDB then the flag...
September 12, 2013 at 8:05 am
sreenubabu.s (9/12/2013)
and foreign key in for 2 coloumns in child table.
can i refer these 2 foreign key columns...
September 12, 2013 at 7:49 am
SteveEClarke (9/12/2013)
OK - The process I need to complete is as follows;
When a Sales Order is Dispatched - I...
September 12, 2013 at 7:23 am
Given the changes here I don't think you need a case expression at all.
Pretty sure this would give you the same results.
SELECT s.Year, s.Customer, s.StockCode, s.MonthNo, s.Volume, x.Cost
FROM [dbo].[tbl_volumes] s
cross...
September 12, 2013 at 7:20 am
krypto69 (9/11/2013)
I have this function called fn_GetTimedKey() when I run it in my SQL2005 environment it works fine.
When I run it in my SQL2008R2 environment I get the error:
Only functions...
September 11, 2013 at 2:53 pm
spin (9/11/2013)
Year.........MonthNo.....Volume.....Cost
2013........1................5000........1
2013........2................4000........1
2013........3................5000........1.5
2013........4................2000........1.5
2013........5................5000........1.5
2013........6................3000........1.5
2013........7................7000........1.5
2013........8................5000........1.5
2013........9................3000........1.5
2013........10................7000........1.62
2013........11................5000........1.5
2013........12................9000........1.5
--the query
SELECT s.Year, s.Customer, s.StockCode, s.MonthNo, s.Volume,
CASE
WHEN Cost IS NULL THEN...
September 11, 2013 at 2:06 pm
Viewing 15 posts - 6,856 through 6,870 (of 15,381 total)