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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by pabowen

  1. pabowen

    Determining Multiple 12 Month Term periods based on Start and End Date

    Well, I believe I have worked it out on my own. Perhaps not the best way, but it appears to work. CREATE function [dbo].[fn_TermPeriods]() Returns table as RETURN ( Select 1 as Number UNION Select 2 as Number UNION Select 3 as Number UNION Select 4 as Number UNION Select 5 as Number...
  2. pabowen

    Determining Multiple 12 Month Term periods based on Start and End Date

    Hello Andrzejek, The terms are to be true 12 months, what you have identified is actually an artifact of the source system where it computes everything as being 1 day too long. The final product will have the enddate shortened by one day. I missed this in the example I provided. However...
  3. pabowen

    Determining Multiple 12 Month Term periods based on Start and End Date

    Hello everyone, Need some guidance on how best to approach this. I have data where I am presented with the following Contract ContractStartDate ContractEndDate A-S00027491 2020-08-06 00:00:00.000 2022-08-06 00:00:00.000 A-S00027526 2020-08-13 00:00:00.000 2022-08-13 00:00:00.000...
  4. pabowen

    Accessing Nested JSON Array Data using OpenJSON

    Hello everyone, and thank you in advance for your help. I have JSON files that I am working on importing into SQL. I am able to access the general data, but there is some data where it contains an Array of data (just a listing) which may be 0 rows, or 100. I am unable to determine how to...
  5. pabowen

    Assembling Multiple Values from a Cross Join into a single field.

    I have a requirement to parse apart a field of data that is separated by a semi-colon, to do some work on the individual results (transform based on a case statement), and then to reassemble so that they are in the format of (value; value; value). I can separate and perform the case statement...
  6. pabowen

    Accessing XMl as part of a SQL Statement

    George, Thank you, your help was invaluable and you did solve the problem perfectly. I greatly appreciate everything. Patrick
  7. pabowen

    Accessing XMl as part of a SQL Statement

    George, thank you incredibly... and Yes I am now kicking myself. :) For the life of me i could not figure out why this was occuring. A follow on Question to this, if I may. When I return the results for this query, I need to associate the Question_PK Column from the originating table so I can...
  8. pabowen

    Accessing XMl as part of a SQL Statement

    George, Here are the answers you requested. Datatype = ntext Version=9.00.4035.00 Value= <optionList><option shuffle="0" isCorrect="0"><text ident="1">&lt;B&gt;A.The brakes and steering failed...
  9. pabowen

    Accessing XMl as part of a SQL Statement

    George, I apparently missed that when I typed it in here, my apologies. I utilized your example however and I am still returning no values. If I simply perform Select * from @MyXML then it shows the values, but not if I try to grab node values. Any thoughts?
  10. pabowen

    Accessing XMl as part of a SQL Statement

    Hello everyone, I have run into a couple of problems that are baffling me. I am able to select XML data if the variable @MyXML is populated using text and a SET command, but if I populate @MyXML using a select statement it will not allow me to parse the variable and return results. For...
  11. pabowen

    Matrix Report Header Labels not printing

    Hello everyone, I have a Matrix Report written in 2005 where the Matrix/columns is Dynamic. I am experiencing an issue where the report renders correctly, it exports to other formats correctly, however.... when Printing only the first 6 columns of the Matrix display their labels. The...
  12. pabowen

    Performance and Tempdb questionw with Complex Query

    Hello everyone, first of all thanks for your help up front. I have a complex update statement that runs once a month against a large db, it was never very fast but we recently moved from SQL 2000 to 2005. The speed has drastically decreased, and it is filling up the Tempdb. On occasion the...
  13. pabowen

    puzzlezzz

    FalconsEye, What is the structure of the table, it is very hard to tell from how the data is show on the screen. Please let us know. Thanks, Patrick
  14. pabowen

    Need to return a record for each month

    RiverGuy, Thank you very much. I had just developed a similar answer right before you responded. By code is as follows: DECLARE @Months TABLE (Date datetime) DECLARE @i int DECLARE @MaxiD int SELECT @MaxId = datediff(month, '2008-09-01', getdate()) SET @i = 0 WHILE @i <= @MaxId BEGIN...
  15. pabowen

    Need to return a record for each month

    The number of months will change depending on the current date, as provided by getdate(). So while it is currently 2, in December it will be 3, in January 4, etc. The point is, I need to create a class for each month from September 2008 until whatever the current date is. Whether that be 2...

Part and Inventory Search

Back
Top