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...
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"...
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...
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?
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...
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...
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?
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...
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...
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...
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...
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?
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...
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...
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?
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...
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...
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...
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...
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!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.