Viewing 15 posts - 16 through 30 (of 65 total)
Doh, of course, recursive CTE! Thanks!
I added some more testdata and rewrote your code to work with it
CREATE TABLE #t_customers (cust_id INT...
May 6, 2018 at 6:31 am
Can't you see it in the GUI? The rows with errors are displayed in red with a Replay Provider Error
I tested a replay myself, and error seems to get EventClass 63485...
May 4, 2018 at 7:52 am
Sorry about that:
CREATE TABLE #t_customers (cust_id INT PRIMARY KEY, limit NUMERIC(19, 2))
CREATE TABLE #t_orders (cust_id INT, order_no INT PRIMARY KEY, tot_value NUMERIC(19, 2))
May 4, 2018 at 6:01 am
Probably an SQL Server bug, no "regular" queries should raise that error, if you don't find it in microsoft connect, you should try to recreate with some sample data and...
May 21, 2017 at 7:09 am
Thanks guys, very interesting, this function seem to be performed during compilation time and evaluation is inserted inline, or something like that.
Because it's not possible to call with variables.
May 21, 2017 at 2:19 am
Hi!
I have a process that deadlocks on itself. It also locks some important tables, so other normal processes are blocked when reading these tables.
But I don't know how to "undeadlock"...
May 22, 2015 at 5:31 am
Yeah unfortunately these routines are complex and in abundance :/
But, do you know how to resolve "self-deadlocks" so they don't lock everything else out?
May 21, 2015 at 11:26 am
Ok, finally found a workaround 😎
You do this first thing in your SP:
-- IF 1 = 0 will trick FMTONLY to process the first SELECT and get correct "datatype" of...
March 19, 2015 at 3:38 pm
Not in the specific case where you're only looking to pull rows that did not find a match: by definition that won't duplicate any data, since no rows will match....
March 19, 2015 at 2:17 pm
You can't have CASE [LastHireDate] WHEN boolean_expression THEN X
Only: CASE [LastHireDate] WHEN value_expression THEN x
Change your case to just:
CASE
When YEAR([LastHireDate]) < Year(@EndYearlyDate) then '12'
When Month([LastHireDate]) = '1' then '12'
When...
March 19, 2015 at 12:53 pm
Ok, what about this query?
SELECT compatibility_level FROM sys.databases WHERE database_id = DB_ID()
It's not that you have compatibility 80 (sql server 2000)?
March 19, 2015 at 12:31 pm
You should add those requirements into your question then 🙂
What about this one? More complex but i couldn't find anything better either
;WITH CTE AS (
SELECTROW_NUMBER() OVER(ORDER BY nRow_id) + maxid...
March 19, 2015 at 12:27 pm
If you want to test for existance / non-existances I think EXISTS is better than LEFT JOIN, since it's more clear what you're doing and LEFT JOIN can at least...
March 19, 2015 at 12:10 pm
Well, this is one (bad?) way to do it:
INSERT INTO tTable (nParent_id, cGroup, cValue)
SELECTx.nParent_Id + y.maxid , 'Two', cValue
FROMtTable x
CROSS APPLY (
SELECTMAX(NRow_id) AS maxid
FROMtTable
) y
WHEREx.cGroup = 'One'
ORDER BY x.nRow_Id
March 19, 2015 at 12:06 pm
Check SELECT @@VERSION
It can be you're using some old SQL Server, alternatively, you might need to alias that function call ie:
select *
FROM dbo.Registos r
CROSS APPLY dbo.fnObtemCategoriaAviacao(r.PaisOrigem, r.PaisDestino) x
For me the...
March 19, 2015 at 11:57 am
Viewing 15 posts - 16 through 30 (of 65 total)