...IS NULL)
SELECT @NextPos = LEN(@string) + 1
INSERT INTO @Result VALUES( RTRIM(LTRIM(SUBSTRING(@string, @Pos, @NextPos - @Pos))))
SELECT @Pos = @NextPos+1
SET @Num = @Num + 1
END
SELECT * FROM @result
Not nearly as nice, not nearly as pretty, but it does avoid XML...
I answered my own question today.
Answer is: Yes.
If anyone else ever wonders this, the identity range management has nothing to do with whether data is available to a subscriber. It's just management of the range (which I suspected.)
Which means, if you are working on a system that has a...
I have a database that will be used for replication.
There are identity columns that will be auto managed on the publisher.
During production, new bulk data is loaded into the database. (via SSIS)
The data added from the WFE begins with an identity 100,000,000. The identity is managed by the...
George,
I wouldn't have thought of that... I knew about the option from the execution side (and in subqueries), but adding it to the troublesome sps fixed it instantly!
God Bless your guess!!
Joe,
I didn't try that, but if i did -- it looks to be about the same (in my eyes) as to issue as I...
So, I have this slow query...
I try to keep the sps flexible, since we have so many (thousands) and business objects pass the same datasets around, so it's useful.
Anyways.. I've found that there's a point where the query optimizer becomes retarded, its' around the 5 or 6 nullable parameter...
Open Business Intelligence Studio.
Open the Server Explorer
Open a new file for XML Schema
Hold SHIFT + CTRL and HIGHLIGHT ever table in the Server Explorer
Drag Onto your visual XSD Designer
It's uber slow, but now you're done.
I also bet this isn't what you want -- but take a stab.
...you set a = b again is there real harm? (the real answer is yes, but do you know why?)
Because everyone should have an nvarchar(5000) column on every table. It's the fundamental rule of databases. See Boyce-Codd's white paper from 1969 titled, "Put all that $h*t in Duplicate Columns as Text"
I know it's 1 table. That's why i did a self join. T1 and T2 are alias'
My query does this exactly. Replace the words Table with the name of your table.
Require once, alias'd twice
I'm not even touching this one.
This would be the same as any data warehousing development process.
Very carefully. :-)
But seriously, for multi-linguage data, I expect that you have data keyed by language, I also expect that you should be building your dimension tables in respect to this.
Get a good inventory on your...
No, it shouldn't -- but then it depends on how they did it. Remember that anything is possible.
My guess is that these are missing "attributes" to which you are refering.
...to it for sorting and what not for my purposes.
Should you ever find yourself in this postion you can use the following to pivot your data:
/****** Object: StoredProcedure [dbo].[uspCrossTab_Get] Script Date: 11/13/2008 10:50:23 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO...
My brain isn't working this morning. I'm trying to figure out why when I'm catching errors I'm not able to see the actual SQL error through nested sps.
ALTER PROCEDURE [dbo].[uspSitePermission_Insert]
(@UserID as int
,@SiteID as int
,@HistoryID as int...
You can do this one of two ways,
1) use XML like listed above (and below)
ALTER PROCEDURE [dbo].[uspRateZoneStructure_AddFromXML]
@XML as xml
AS
--<?xml version="1.0" encoding="utf-8"?>
--<RateZoneStructure>
-- <RateZone>1</RateZone>
-- <ContractorID>1</ContractorID>
--...
Here's an easy trick that I use alot when i need to pass a variable where clause:
ALTER PROCEDURE [dbo].[uspElectricCode_Getall]
@UserID int = null,
@LanguageID int = null,
@RegionID int = null,
@ContractorID int = null,
@ElectricCodeID int = null
AS
SELECT [EC_ElectricCodeID]...
George is right, SQL server is smart enough to know the difference.
From your stand-point and knowing that SQL will almost 100% optimize the execution of your SQL regardless of how you write it, you should focus on readability.
The first is much easier to read (atleast to me).
:-)
Thanks for the reply Diet, I've been struggling with this issue for weeks.
My approach to solving this was to use a cube to return my results -- which I didn't get all the way through, but from what I started, it looked promising.
Anyone know how to do multi-group roll-ups?
Example:
Events Happen daily.
Events Happen During Morning, Noon, Night
People Do the events
People Report to people.
I have a drill down that shows: People reporting to people, the bottom person's events grouped and drilled to the day.
I want...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.