Viewing 15 posts - 8,551 through 8,565 (of 8,753 total)
There where two table value functions introduced in 2012, sys.dm_exec_describe_first_result_set and sys.dm_exec_describe_first_result_set_for_object, the former takes a query string as a parameter, the latter an object id. The result sets are...
April 20, 2014 at 5:14 pm
An alternative, without the STCrosses function, filtering using STIntersects.
😎
DECLARE @GEOLINE TABLE
(
GEOLINE_ID INT IDENTITY(1,1) NOT NULL
,GEOLINE_LINE GEOMETRY NOT NULL
);
INSERT INTO @GEOLINE (GEOLINE_LINE)
VALUES
(geometry::STGeomFromText('LINESTRING(0 1,...
April 20, 2014 at 6:34 am
If the search string is only one word/pattern then a recursive approach could be an option. Or maybe a combination of the two?
😎
DECLARE @searchString nvarchar(255)= 'first';
DECLARE @DISP_SIZE INT = 50;
...
April 20, 2014 at 5:25 am
PSB (4/17/2014)
Minutes
1397750400000 Minutes
23295840000 Hours
970660000 Days
2657522 Years
The first birthday of Homo habilis?
😎
April 20, 2014 at 4:24 am
Just for fun (with nothing better to do), a recursive and a window function approach 😎
Neither are perfect, more like a little twist....
A resource hungry recursion:
USE tempdb;
GO
IF EXISTS (SELECT *...
April 20, 2014 at 2:50 am
redcn2004 (4/19/2014)
when c0=1 and c1=1 and a0=b0 and a1=b1 then print
when c1=1 and a1=b1 then print
when c1=1 and c2=1 and a1=b1 and a2=b2 then print
....
...
April 19, 2014 at 4:27 am
Jacob Pressures (4/17/2014)
Hi, Thanks for the response.In the relationship between Payment and Payment_Type tables, aren't the crows feet backwards?
Yes, I missed the typo:w00t:
I see your design i think between Payment...
April 19, 2014 at 4:01 am
fregatepllada (4/17/2014)
Yes, I agree - but you could use a wrapper SP to catch an exception (RUSSIAN DOLLs model :-))
Boils down to the same thing, the exception rolls back the...
April 17, 2014 at 5:11 am
fregatepllada (4/17/2014)
I am not quite agree with this statement "SQL Server has no specific functions or methods for validating XML".
How about strongly typed XML...
April 17, 2014 at 3:52 am
Jacob Pressures (4/16/2014)
Customer,
Customer Credit Card,
Credit Card
Order
But a customer can also pay with cash.
Should I have a payment or transaction table which allow null IDs...
April 17, 2014 at 12:31 am
I agree with rVadim that you should probably consider another approach if possible.
Having said this, here an example code for a procedure to drop and create the view:
CREATE PROCEDURE dbo.USP_REFRES_THE_LATEST_VIEW
AS
IF...
April 16, 2014 at 11:48 pm
What about the values passed in the where clause, a typical mistake would be mixing up the two parameters.
😎
April 16, 2014 at 11:54 am
dwilliscp (4/16/2014)
But looking at the...
April 16, 2014 at 8:36 am
This should get you started, cannot do this in a view though, in a stored procedure it works fine.
😎
USE [tempdb]
GO
CREATE SCHEMA [SCHEMA01] AUTHORIZATION [dbo];
GO
CREATE SCHEMA [SCHEMA02] AUTHORIZATION [dbo];
GO
CREATE SCHEMA [SCHEMA03]...
April 16, 2014 at 5:06 am
Check out this article, Control Flow Task Errors – Level 9 of the Stairway to Integration Services[/url]
😎
April 16, 2014 at 4:09 am
Viewing 15 posts - 8,551 through 8,565 (of 8,753 total)