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

    Populating query parameters from a temp table

    I do believe that I found a way to do this without using cursors by creating a temp table, then using cross apply to broaden the temp table and then doing a cross apply against the transaction table with the temp table. If anybody is interested I can post what I ended up with. wb
  2. wbodger

    Populating query parameters from a temp table

    I am building a system where users can customize queries to pull data out of a transaction history table. The parameters are stored in a temporal table so we can easily track changes CREATE TABLE [dbo].[RedFlagsLimits]( [Id] [int] IDENTITY(1,1) NOT NULL, [CreatedBy] [int] NOT NULL...
  3. wbodger

    Find consecutive numbers 3 or more within a set

    Had a whole reply typed up, decided to try one more thing and... I think that I've got it. Thanks for pointing me to the Islands!
  4. wbodger

    Find consecutive numbers 3 or more within a set

    I am trying to find instances where there are 3 or more consecutive check numbers for a given account. For instance, if I have: Account CheckNumber Amount 001234 34546 500 001234 34547 1100 001234 34890 6 001234 35000 1000 001234 35001 1500 001234 35002...
  5. wbodger

    ETL between two non-linked SQL servers

    I have two servers, both running SQL Server 2016 and I need to copy ~12 tables from one server to another, transform (link to a table on destination server and change businessid) and then load into the same server name on new server. My question is: Can I do this in one statement(pull data from...
  6. wbodger

    Constraint to modify value if not unique

    So, it seems like I will really need to use a trigger to achieve this, yes? I like the way you used row_number. Thanks, willie
  7. wbodger

    Constraint to modify value if not unique

    I have a process that does a bulk import where I build a field value given incoming values. Sometimes, ALL of the incoming values are the same, but they are not duplicates. Since this is a bulk import, I don't know of any way to really check if the field value I have built is being built the...
  8. wbodger

    SQL Server 2016 Database Audit Specification

    Hello All! I am working on getting the Failed_Database_Authentication_Group and Successful_Database_Authentication_Group specifications to work, but my changes do not seem to be taking. I disable the audit and the database audit specification, I modify the database audit specification...
  9. wbodger

    Overmatching?

    Sorry, the data is not that clean. Not strictly. What I have is a table with Core data and a table with detail data. I am matching detail to core so that I can move to history. However, there are a few issues that come in to play, one of them being that I may have 3 transactions in the core for...
  10. wbodger

    Overmatching?

    If I have this data ID Acct Date Amount TranCode ID Acct Date Amount TranCodeType 5 123 7/5/2017 10000 18 76 123 7/5/2017 10000 12 6 123 7/5/2017 10000 18 77 123 7/5/2017 10000 12 7 123 7/5/2017 10000 18 78 123 7/5/2017 10000 12 between two tables (with ID being the first field in each...
  11. wbodger

    updating a subset of data

    No, that is not an issue for me, I have got that covered.
  12. wbodger

    updating a subset of data

    It balked at me when I tried that earlier. Except I didn't try quite that, I missed the parentheses around @Quantity. That works great, thanks! wb
  13. wbodger

    updating a subset of data

    I am writing a stored procedure that will insert an order and then assign N serial numbers to that order id and I am wondering if you kind folk can give me any insight into which approach would be better practice (or if I am missing a third option?). The options that I have come up with are...
  14. wbodger

    Returning data from a stored procedure to .Net code

    Wondering if it is better practice to use OUTPUT variables (and am I using them right) to return some values to the calling code CREATE PROCEDURE [dbo].[InsertOrUpdateFormPageData] @FormPageDataId int null, @FormPageId int, @CreatedBy int null, @PostedJSONData nvarchar(max), @UpdatedBy...
  15. wbodger

    Check Constraint to check view (a no-no) or multiple tables (subquery or UDF)

    I have a relationship table which I only want to allow certain entities to enter a record. And those entities could exist in one several places/tables. I have a view that aggregates all of them, but you cannot reference a view in a constraint. So, I was thinking UDF, but now I see that is often...
  16. wbodger

    Selecting only "finished" groups

    Hmm... Thx, I'll give it a shot
  17. wbodger

    Selecting only "finished" groups

    OK, let's say that I have a table with 5 columns: ID, Name, ProviderId, Date, Amount Now, let's say that I fill in 4 of the fields and the client has to fill in the fifth field (in this case, ProviderId) Is there a nice way to ONLY select the Name (they will be grouped by name and date) for...
  18. wbodger

    T-SQL and Error Handling

    Yes, I am looking only at server side code

Part and Inventory Search

Back
Top