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 TouchToneTommy 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: *

  • Users: robertfah
  • Content: Threads
  • Order by date
  1. robertfah

    Search Stored Procedures

    For years I've been looking for a way to search all the SP's in a specific DB for a specific string. In most cases, it's usually when I'm cleaning up our database and find a table that I think is no longer in use. I then need to search the SP's to make sure the table isn't in use. I believe I...
  2. robertfah

    Accessing .cs variable from .ASPX page

    I need to access a variable from my code behind in the .aspx page and it's not working. Here's what I'm trying: .aspx page - RequiredFieldValidator <asp:RequiredFieldValidator ID="rfvEditWebLogin" runat="server" ControlToValidate="txtWebLogin"...
  3. robertfah

    Self Join SQL

    I've got 2 tables that I need to get data from...my users table looks like this: Users Table ------------- UserID FirstName LastName WebLogin WebPassword Active UserAlternates Table --------------------- UserAlternateID UserID AlternateUserID Users Table Data ------------------ 1, John...
  4. robertfah

    Generate SQL Script to create table and it's data.

    I need to write a method that will take a table name as a parameter and generate the SQL statement for creating and inserting the data. What I'm trying to do is copy a table and it's data to another database but I only need the SQL to do so. Any ideas?
  5. robertfah

    Is Order By that costly?

    I've got a large query that has many joins and returns roughly 13k records. I've noticed lately that there's a long pause within the program which this SP is executed, so I decided to run it in the Management Environment to see what's up. Here's the SQL: SELECT Issues.*, c.CustomerName...
  6. robertfah

    SQL to get user password

    I've got a windows app that uses a Crystal Report to show data from our DB. My issue with it is that in code, it requires a Login name and Password for the DB. I do not want to hard-code this info for obvious reasons, so is there a way I can retrieve a password for a specific DB user with SQL...
  7. robertfah

    Any upgrading issues from SQL 2000 to 2008?

    Pretty much what the topic says...we are preparig to upgrade our SQL Server 2000 to 2008 and was curious if there are any hurdles that I should be aware of?
  8. robertfah

    Show complete exception error

    I've got some code that stores any errors to our DB and emails us when it happens. Here's the simple call: catch (Exception ex) { if (System.Diagnostics.Debugger.IsAttached) System.Diagnostics.Debugger.Break(); else...
  9. robertfah

    Best approach to this SP

    What is the best practice/approach to writing a SP that returns either a single row or all rows based on the 1 parameter passed in? Lately we've noticed a need to retrieve either 1 record or all records from tables within our DB (Customer(s), Location(s), Room(s), etc.). So for customers, we...
  10. robertfah

    Perform multiple inserts and terminate is errors

    I need a way to insert multiple records into 2 tables and terminate the process if any errors occur. I have Issues and IssueActivities that I will be migrating over to another DB through a program. For every 1 Issue, there are many IssueActivities. The data doesn't match up (meaning ID's...
  11. robertfah

    Update field length on all DB's

    Is there a way to programmatically change the length of a varchar field on a specific table across multiple DB's? I've got a field in a table that I need to make the length bigger (currently it's varchar(50) and needs to be varchar(200)) and I've got to do it across 35+ DB's. All the tables...
  12. robertfah

    SQL 2000 - BEFORE Update Trigger?

    I've got a table that is controled by a 3rd party software. I need to be able to copy the contents of this table to another table BEFORE any updates happen. So basically, I would have a copy of the OLD table data in one table and the current data in another. Any ideas?
  13. robertfah

    Print 1 4x6 on multiple pages

    Maybe I'm missing something here but I'm trying to do something very simple. I have an image that I want to print as a 4x6. When I try to print with the Photo Viewer, I select the image, right-click and choose print. Select 4x6 on the side and uncheck "Fit Picture to Frame". The print...
  14. robertfah

    Use CONVERT in dynamic SQL

    I've got some SQL that I can get to run just fine but as soon as I convert it to dynamic SQL, it errors out. I know why it errors out, I just don't know how to get around it. Here's my SQL when it works: SELECT LocationID, 11, 70, 'TSS-1', NULL, 'TBD-' + CONVERT(varchar, LocationID) FROM...
  15. robertfah

    Get SELECT part of Stored Procedure

    Is it possible to get just the SELECT portion of a stored procedure? So if I had a SP like: SELECT foo1, foo2, foo3 FROM Foo It would return: "foo1, foo2, foo3" A bunch of us were pondering this idea over lunch and it got us curious. Any ideas?
  16. robertfah

    Override ToString()

    Don't know if this can even be done or if my thinking is way off but I'll try to explain what I would like to do. I've got a class called "Issue"; it holds properties for a Help Desk Issue (IssueID, UserID, IssueTypeID, etc.). I have a need in the code-behind to store the "string" values of...
  17. robertfah

    Update SP

    I've got an Update SP that updates fields in a table. The table has 30+ fields so we came up with a SP that would only update whatever parameters were passed into it: ALTER PROCEDURE [dbo].[UpdateIssue] @IssueID int, @ReceivedDate datetime = NULL, @DueDate datetime = NULL...
  18. robertfah

    Days, Hours, &amp; Minutes from a Long?

    I've got a field in my table called TimeSpent and it's a bigInt. We store the number of TICKS from our C# application that corresponds to a number of days, hours, and minutes they input. For instance, if the user puts in 0 days, 0 hours, and 10 minutes, then the value that is stored is...
  19. robertfah

    Storing Time

    I need a way to store Days, Hours, and Minutes in my table but would like to know the best way to do this. ATM, the user is given the ability to enter Days, Hours, and Minutes for a given entry (each has it's own textbox on the GUI) so what do you think the best way is to store and retrieve the...
  20. robertfah

    RegEx for numbers only, no decimals

    I'm looking for a RegEx format that will allow a user to enter numbers only into a textbox, without decimals. But I'd also like to see the thousand (or ten thousand, etc.) seperator. Ex: 123 1,234 12,345 123,456 1,234,567 Any help would be greatly appreciated!

Part and Inventory Search

Back
Top