Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. hwkranger

    SUBSTRING with CHARINDEX

    sqlfable -- I liked your neat little trick. I might use it in the future. rose -- an alternative is: DECLARE @string nvarchar(100) SET @string = 'INDEX~OBJ~USR~GRANTCD~GRANTDTL~PROJCD~PROJDTL ' DECLARE @result table (string nvarchar(100)) DECLARE @Num int DECLARE @Pos int...
  2. hwkranger

    Replication Question

    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...
  3. hwkranger

    Replication Question

    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...
  4. hwkranger

    Slow SP (Query)

    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...
  5. hwkranger

    Slow SP (Query)

    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...
  6. hwkranger

    SqlServer Database To XSD

    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.
  7. hwkranger

    Query to query itself??

    Why not? (i'm sure this will get me into trouble) Actually, it's because I was lazy. Not a good answer -- but if a = b, and 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...
  8. hwkranger

    getting file over ip

    Check your folder permissions.
  9. hwkranger

    Query to query itself??

    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.
  10. hwkranger

    Integrating multilingual data

    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...
  11. hwkranger

    Does an app loading an XML file care if empty fields are missing?

    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.
  12. hwkranger

    Query to query itself??

    This is impossible as you will see below.. UPDATE T1 SET RelatedName = T2.Name FROM Table T1 INNER JOIN Table T2 ON T1.RelatedID = T2.ID jk. Cheers.
  13. hwkranger

    6.5 need efficient query to group information

    I'll give my 2 cents. George has the right solution (as almost always) -- I work in a world of dynamic columns -- so I can't always hard code my columns. I think i got this idea originally from TeamSQL about 5 years ago or so. I've made modifications to it for sorting and what not for my...
  14. hwkranger

    Raising Errors through nested SPS

    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...
  15. hwkranger

    Parsing values

    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> --...
  16. hwkranger

    How to code choosing wildcard or variable in WHERE clause?

    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]...
  17. hwkranger

    Best left outer join method

    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). :-)
  18. hwkranger

    Subreports in deployment

    You have to deploy the subreport -- otherwise It'll use the previous version you have deployed.
  19. hwkranger

    SSRS Question -- Multi-group rollups -- recursive heirarchy

    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.
  20. hwkranger

    SSRS Question -- Multi-group rollups -- recursive heirarchy

    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...

Part and Inventory Search

Back
Top