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

    Employee Recognition Issues

    The CIO of our company started giving time for shout-outs/high-fives in our weekly IT Standup meetings. Just a few minutes to say thanks for a couple of people who went above and beyond for the week and truly made a difference. Unfortunately, it only took about four weeks and it turned into a...
  2. SgtJarrow

    Error Creating a Table valued Function

    Just a thought...have you considered just adding an INDEX to your existing VIEW that is slow and cumbersome? Create Indexed Views Robert "Wizard" Johnson III U.S. Military Vets MC Data Integration Engineer
  3. SgtJarrow

    Why the Aliases

    We could argue all day on standards and naming conventions. Everyone has personal tastes and preferences. The IMPORTANT things about standards are: You have some standards They make some sense You ADHERE to them For the most part, I (read as you) can adapt to any standard or convention. But...
  4. SgtJarrow

    Why the Aliases

    Dave is right..probably built by a code generator. One comment though...The table alias on each column. My company's code standard is to ALWAYS alias a table AND to ALWAYS include the table alias in each column definition. Why when there is only one table in the query? Because tomorrow you will...
  5. SgtJarrow

    Subquery question

    Can you provide sample table schema, keys and a few sample records in each? Some expected output would help as well. I believe you/we are missing some information in order to assist you. Your base table doesn't exist and doesn't really have a join to the derived query. SELECT ID, NAME...
  6. SgtJarrow

    I have a 3 part key that look like:

    I'd start with the original value, then use SUBSTRING to get the correct value. DECLARE @InputValues TABLE ( DataValue VARCHAR(100) ); INSERT INTO @InputValues (DataValue) VALUES ('1234567*AWD*2017/FA'), ('1234345*AWD2*2017/FA'), ('1234555*BDD09*2017/FA'); SELECT iv.DataValue...
  7. SgtJarrow

    I have a query that's basically lik

    To expand on Andy's response, I believe the issue lies in your JOIN statements. The emphasis you provided by stating that there were "(MULTIPLE VALUES FOR PROGRAM_ID)" indicates your JOIN statement will need more than one clause in order to match the records properly. Andy is asking you to...
  8. SgtJarrow

    Hello, I am trying to check the last 5 values for each employee and hold a matching value

    Thank you George. I wanted a single-query solution and couldn't "see" it. The concept of the DISTINCT Hours was my missing link. I like your solution. Robert "Wizard" Johnson III U.S. Military Vets MC CSM, CSPO, MCPD, CCNA, CCDA, MCSA, CNA, Net+, A+, CHDP Data Integration Engineer
  9. SgtJarrow

    Hello, I am trying to check the last 5 values for each employee and hold a matching value

    While waiting for a version response, here is one possible solution for SQL 2012 or newer. I've added some comments, but please let me know if you need further explanation. --Create a table variable to hold our test data. DECLARE @Times TABLE ( EmployeeId INT, WeekNumber INT, HoursWorked...
  10. SgtJarrow

    Hello, I am trying to check the last 5 values for each employee and hold a matching value

    OK. Now the requirement makes sense logically so that we can come up with a solution. One more follow-up...what version of SQL are you using? It can make a difference in the solution. Robert "Wizard" Johnson III U.S. Military Vets MC CSM, CSPO, MCPD, CCNA, CCDA, MCSA, CNA, Net+, A+, CHDP...
  11. SgtJarrow

    Hello, I am trying to check the last 5 values for each employee and hold a matching value

    So I go to work on a solution to assist you in this and either I am missing something or your requirements are overly complicated. If the last 5 records Hours column for a particular employee match, the most recent Hours record is the value you want. If the last 5 records Hours column for a...
  12. SgtJarrow

    For Computer Dinosaurs

    Great read....just Great! Robert "Wizard" Johnson III U.S. Military Vets MC CSM, CSPO, MCPD, CCNA, CCDA, MCSA, CNA, Net+, A+, CHDP Data Integration Engineer
  13. SgtJarrow

    Refresh DatagridView on Main Form when another form closes

    You should have something like (typed, not tested): On Form_Appt_Main: btnNew_OnClick() { var fan = New Form_Appt_New; if (fan.OpenDialog() == DialogResult.Ok) { Datagrid.Refresh() //Whatever you use to load/reload the datagrid goes here } fan.Close() } On...
  14. SgtJarrow

    Help converting deprecated joins

    Try the below code. I found two issues with your attempt to make this code SQL-92 compliant. The first is with one of the OUTER JOINs. You identified 'c.fkLocation =* l.pkLocation' as a LEFT JOIN and the operator (=*) listed is a RIGHT JOIN operatoer. I prefer to use LEFT JOIN only so I...
  15. SgtJarrow

    Report "Include Link" Formatting

    So my company has finally stepped up from a single SSRS 2008 R2 instance to a clustered SSRS 2014 set of servers. Woohoo! I don't know all the specs for the cluster. I was given the cluster primary node name and am currently working through any changes needed due to the switchover. The most...
  16. SgtJarrow

    Use Of REMOTE Hint

    So I have a newer T-SQL developer in my company and I am code reviewing his first big set of work for me. The only real big thing I have found in his code is the constant use of the REMOTE hint when accessing linked servers. Sample queries provided below so you can see what I am referring to...
  17. SgtJarrow

    "...ask the ask"?!?

    Is this a culture thing? A slang-speak, so to say? Maybe your speaker doesn't have a "professional" switch or thinks the audience is receptive to that usage. In my professional community I wouldn't expect to hear that manner of speech, but outside of where I work I probably would - depending...
  18. SgtJarrow

    Calculate max lenth of a database row.

    I always forgot to stress those points Andrzejek. Thanks for reminding everyone that its not always best to do something just because you can. Robert "Wizard" Johnson III U.S. Military Vets MC CSM, CSPO, MCPD, CCNA, CCDA, MCSA, CNA, Net+, A+, CHDP Senior Database Developer
  19. SgtJarrow

    Calculate max lenth of a database row.

    You are diving more into DBA-type questions...Not programming questions. This is not my strongest area and I'd recommend you try the Microsoft SQL Server: Setup and Administration Forum (http://www.tek-tips.com/threadminder.cfm?pid=962). Based on my limited DBA knowledge, you might be mixing a...
  20. SgtJarrow

    Calculate max lenth of a database row.

    One quick follow-up. To filter the results to only show the table you are interested in, use: DBCC SHOWCONTIG ('Schema.Table') WITH TABLERESULTS As normal, Schema can be left off if the Table is located in the default Schema (usually dbo). Robert "Wizard" Johnson III U.S. Military Vets MC...

Part and Inventory Search

Back
Top