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

    Help building sp_executesql script

    Play around with this one. declare @dynamicsql varchar(max) set @dynamicsql = 'INSERT INTO Results SELECT' select @dynamicsql = @dynamicsql + ' t1.list from ' + dblist.list + '..files t1 join searchlist on t1.list like ''%' + searchlist.list + '%'' UNION SELECT' FROM dblist JOIN...
  2. philhege

    What is [sys].[sp_columns_100_rowset] used for?

    It's typically used by applications that employ server-side cursors to process the data. ----------- With business clients like mine, you'd be better off herding cats.
  3. philhege

    Search and Rescue

    In the case of David Lee Roth, perhaps search and rescue would be in order. ----------- With business clients like mine, you'd be better off herding cats.
  4. philhege

    Vanity Plates "XVII"

    Norse shrink? ----------- With business clients like mine, you'd be better off herding cats.
  5. philhege

    Sloppy!

    People in the Valley are very different from the rest of us. Their world hinges on an unusual perspective. Apparently, so do their gates and pillars. ----------- With business clients like mine, you'd be better off herding cats.
  6. philhege

    Use of Get vs Gets

    The crux of the biscuit is the apostrophe. No, wait; I mean the crux of the matter is the neither...nor construction. It typically takes a singular verb. Sounds awkward, and is disappearing from general use, but hey, a rule's a rule. http://www.grammarbook.com/grammar/subjectVerbAgree.asp...
  7. philhege

    ifnull

    This question should be posted to the MySQL forum. There may be behaviors of IFNULL() that T-SQL folks are not familiar with. https://www.1keydata.com/sql/sql-ifnull.html ----------- With business clients like mine, you'd be better off herding cats.
  8. philhege

    SQL Server 2014 Express making a bat file to run a SQL script to backup at night

    Try Powershell: http://thomaslarock.com/2012/07/automate-sql-server-express-backups-with-powershell/ ----------- With business clients like mine, you'd be better off herding cats.
  9. philhege

    Steps to Set Up Trusted Connection

    I use connectionstrings.com for formats. Look up trusted connections there. It's fairly simple. ----------- With business clients like mine, you'd be better off herding cats.
  10. philhege

    Email Users that their password is Expiring

    Kinda simply put (sorry), but you could wrap this code in a for-each loop, and parse a comma-delimited list of OU's from the SearchBase property. Then evaluate each for which language you wish to apply. ----------- With business clients like mine, you'd be better off herding cats.
  11. philhege

    SSMS 2014 bug not freshing to see new changes made to tables or otherwise

    When you select 'Script Table as' > 'Create to' > 'New Query Editor Window', does it show the ID field? If so, it's reasonable to assume that SSMS knows enough not to include a primary key field in an INSERT statement. ----------- With business clients like mine, you'd be better off herding cats.
  12. philhege

    sum field based on criteria

    I included the DDL and insert query to serve as a complete example. The query in my code block performs a SUM of the amount for each type of source. Did you try that? Maybe I'm not understanding what you're trying to accomplish. ----------- With business clients like mine, you'd be better off...
  13. philhege

    Understanding OPENQUERY and ticks

    Passing variables to an OPENQUERY statement is a bit tricky. You could use sp_executesql; it's cleaner. Check this thread for some ideas. ----------- With business clients like mine, you'd be better off herding cats.
  14. philhege

    sum field based on criteria

    This is a perfect case for GROUP BY. USE [Test] GO /****** Object: Table [dbo].[SumTest] Script Date: 04/20/2016 12:52:53 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING ON GO IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id =...
  15. philhege

    how to do a join after doing a union between 2 tables

    Sounds like a question for a Domo forum. ----------- With business clients like mine, you'd be better off herding cats.
  16. philhege

    How to add this code in??

    Sorry, missed the closing paren you wrapped around your WHERE clause. You should be good to go now. ----------- With business clients like mine, you'd be better off herding cats.
  17. philhege

    How to add this code in??

    replace the code on the right side of the equation with convert(varchar,DATEADD(d,CASE DatePart(dw,getdate()) WHEN 1 THEN 1 WHEN 7 THEN 2 WHEN 6 THEN 3 WHEN 5 THEN 4 ELSE 2 END,getdate()),103) ----------- With business clients like mine, you'd be better off herding cats.
  18. philhege

    How to add this code in??

    Ugh, should run code before I post it. ----------- With business clients like mine, you'd be better off herding cats.
  19. philhege

    April first!

    Every month should be October. ----------- With business clients like mine, you'd be better off herding cats.
  20. philhege

    How to add this code in??

    Looks like you want records two business days in the future. Try WHERE (CONVERT(varchar, dbo.OrderHeader.DateRequired, 103) = convert(varchar,DATEADD(weekday,2,getdate()),103)) ----------- With business clients like mine, you'd be better off herding cats.

Part and Inventory Search

Back
Top