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

    How Do You Handle Temporal Data?

    born2program-- Thanks for the reply. Do you keep the current record in BOTH the CurrentPerson AND the HistoryPerson table? OR, do you do some sort of UNION of the two, (perhaps in a view,) to access both current and past records? Thanks, Gooser http://www.cafepress.com/SQLPimp
  2. Gooser

    How Do You Handle Temporal Data?

    How do you handle temporal data? I have requirements that suggest we need to know not just what the value of an attribute is today, but what that value was at any point in time. For example, if you get married this June 10th, queries would show your last name as it was BEFORE you were married...
  3. Gooser

    What is ITIL?

    Anybody work with ITIL? If so, any links to good resources would be exceptionally helpful. I have 11 days to get a decent, basic knowledge of what it is and how to implement. Thank you, Gooser
  4. Gooser

    Comments in Code Passed to sp_executesql

    I tried this and it worked: declare @try nvarchar(1000) set @try = 'Select * from <tablename> /*some comment*/' exec sp_executesql @try
  5. Gooser

    Comments in Code Passed to sp_executesql

    [CODE SQL] SET @newsql_1 = 'INSERT INTO @egbs_1 VALUES ( ' + @newsql_1 + ' )' EXEC sp_executesql @newsql_1 SELECT * FROM @egbs_1 [/CODE] This project is just a thorn in my side! Okay, so the code being passed to sp_executesql here, @newsql_1 had an ORDER BY clause in it. Of course, INSERT...
  6. Gooser

    Scope of a Table Variable in Relation to sp_executesql

    Isn't the overhead for that kind of large? You see, if I ever get this working I plan to put it into a loop that will run it about 60,000 times, (as part of a one-time data conversion effort, the source database isn't normalized so this seems to be the best/quickest way to extract the data I...
  7. Gooser

    Scope of a Table Variable in Relation to sp_executesql

    I'll try to simplify here since the code is thousands of lines long and unnecessarily complex. (not my code.) What I have is a stored procedure that builds SELECT statements based on literally hundreds of variables and then runs them. I don't wish to duplicate the logic (or even try to...
  8. Gooser

    Why doesn't this work?

    George, thanks (as usual), it turned out that what I thought held a SELECT statement held some other statements as well. (I didn't write that part.) The other statements declare a variable for a where clause, then set it's value, but they are never used. Yay for SUBSTRING()! I try to follow...
  9. Gooser

    Why doesn't this work?

    Other than the missing INTO keyword. ... D'OH!
  10. Gooser

    Why doesn't this work?

    INSERT @egbs_1 ( [risk_id], [risk_version_id], [contact_id], [risk_status_id], [risk_status_value], [risk_status_nm], [city], [state_cd], [state], [postal_cd], [extended_postal_cd], [county] ) VALUES ( exec sp_executesql @newsql_1 ) @newsql_1 contains a valid select...
  11. Gooser

    INSERT the Results of a Stored Procedure with Multiple SELECTs?

    George- There are 5 different SELECT statements in the stored procedure, I need to port the results of each into separate tables, i.e. RiskAddress, RiskDetails, RiskOwnerDetails, RiskConstructionDetails, RiskProtectionDetails. (For us, a "Risk" is a basic unit of work, it is an insurable...
  12. Gooser

    INSERT the Results of a Stored Procedure with Multiple SELECTs?

    RiverGuy, thanks for the response. However, I can't make changes to the stored procedure because it is also used to generate reports for another application. Any further ideas?
  13. Gooser

    INSERT the Results of a Stored Procedure with Multiple SELECTs?

    I have a stored procedure (which is overly complex and written by someone else) that I need to take the results of and put them into tables. The stored procedure uses Dynamic SQL to build and then run 5 SELECT statements based on literally hundreds of variables. I need to take the results of...
  14. Gooser

    IDE Question - Can you Un-Dock the Results Pane?

    I just got my fancy-schmancy two-monitor setup set up. And I was wondering if you can un-dock the results pane in Management Studio. This'd be nice, because it could give me a whole monitor just to write code on, and everything else could be on the other monitor. I poked around in the...
  15. Gooser

    Pass Variable to Stored Procedure?

    You may have to cast invoiceNumber as a varchar. @filename = 'c:\Export\' + CAST(LTRIM(@InvoiceNumber)AS varchar(32)) + '.pdf', v/r Gooser
  16. Gooser

    How Can I insert an Apostrophe in a field of a SQL table?

    ...Though, after further thougth, it would be better to do it at the time you select it. SELECT <...columns...> , CAST(char(39) + <columnname> AS varchar(32)) , <...columns...> FROM <tablename> Hope this helps. v/r Gooser
  17. Gooser

    How Can I insert an Apostrophe in a field of a SQL table?

    You could do something like this: UPATE <tablename> SET <columnname> = CAST(char(39) + <columnname> AS varchar(32)) v/r Gooser
  18. Gooser

    Syntax error in TextHeader of StoredProcedure?

    George- Again, I cannot thank you enough for your insightful help. Unfortunately the Stored Procedure was corrupted beyond repair. Though I was eventually able to restore a ShadowCopy version of the database file from early yesterday morning and the Stored Procedure was still in that version...

Part and Inventory Search

Back
Top