Viewing 15 posts - 1,576 through 1,590 (of 13,849 total)
You'd have to check for zero in the divisor first. There's no DIVIDE() function in T-SQL. IF(divisorColumn = 0, NULL, NumeratorColumn/DivisorColumn)
There's a more concise way of achieving that:
NULLIF(Divisor,0)
February 20, 2022 at 6:38 pm
DROP TABLE IF EXISTS #T1;
CREATE TABLE #T1
(
Col1 DECIMAL(19, 6) NOT NULL
,Col2 DECIMAL(19, 6) NOT NULL
,PCDiff AS CAST((Col1...
February 20, 2022 at 12:01 pm
This is not a question. What is the problem?
February 20, 2022 at 9:28 am
Can you tell me another way to process xml files of greater than 2mb, I try your way to process it but still found a problem with it. My...
February 17, 2022 at 8:40 am
I've considered that, but I'd still have to find the new / modified rows and that's what this query is supposed to be doing in order to avoid having...
February 15, 2022 at 2:34 pm
As you're already working in C#, that link looks good.
But, as always, you should test it to make sure it works the way you want.
February 12, 2022 at 8:25 pm
As SSIS is a server-based technology, outputting messages to a console is largely pointless, as there will usually be no one there to see them. Write your messages to a...
February 12, 2022 at 6:38 pm
Hi
First: Use in your SP Begin try and begin catch SQL Satements.
For eq.
Begin try
Update Tabelle
Set field= 1/0
Where field2=1
--here rais an error because Division durch zero
Ende Try
Begin catch
-- here you...
February 12, 2022 at 6:33 pm
This sort of thing is best done in the report (ie, at presentation time) rather than in the query.
February 11, 2022 at 11:04 am
As the statement preceding WITH in the definition of a CTE must be terminated by a semicolon, it cannot follow EXISTS or APPLY.
February 11, 2022 at 10:13 am
I do not know the answer to your question, but I do have a couple of questions about your solution architecture.
February 11, 2022 at 8:53 am
The usual protocol in this forum is to leave your original post intact and instead to make another post explaining what the issue was and how you resolved it. This...
February 11, 2022 at 8:44 am
Trimmed down your code a bit. Works for me.
DROP TABLE IF EXISTS dbo.CTR_PanelMembers;
DROP TABLE IF EXISTS dbo.CTRs;
CREATE TABLE dbo.CTRs
(
CTRseqNo INTEGER IDENTITY(1, 1) NOT...
February 10, 2022 at 1:31 pm
Please format your code in future.
As you have not included desired results, I have no idea what you are trying to achieve. But this query runs, at least.
February 10, 2022 at 11:27 am
Single quotes are for chars. Use double quotes for string literals ... it should work.
February 9, 2022 at 10:55 am
Viewing 15 posts - 1,576 through 1,590 (of 13,849 total)