What is the proper syntax for using the exec('sql statement') inside of an update statement?
I have an update statement like this:
update #tmp_tbl set
field1 = (exec('select ' + (select fieldname from fieldnametable where category = id) + ' from datatable where trans_id =...
My hard drive crashed, and I had many songs from iTunes downloaded. I have another computer,with iTunes installed, and want to redownload my songs from apple, but apple wants $50 to start troubleshooting. Someone may know how to download my songs again. I have no iPod, and everything on the...
I want to insert the results of a stored procedure directly into a temp table. Is there a way to do that without first declaring the temp table? Using TSQL, you can do it like this;
select field1, field2, field3
into #table
from tablename
If I try to do this:
exec storedprocname param1...
I have a stored procedure that I need to know how many records were returned in the recordset. I have been reading up on the recordset.recordcount method, but everything seems to be for inline sql, not stored procedures. Any help is appreciated. Thanks.
I have a trigger that saves any changes made to one table in our database, to another table, just for historical backup purposes. The trigger works just fine, but the only problem is if I run a bulk update statement in Query Analyzer. I get a "Subquery return more than one result"...
I have a stored procedure, that I build a temp table, using a string. The reason for building the temp table in a string, is I have a dynamic number of columns, depending on how many metrics a user selects. This string built table is the first of many temp tables to be utilized in this stored...
I have a UDF that takes a CSV, and puts each value into a temp table, and gives it an incremental value. So a string "3,6,9", will look like this;
Id Value
1 3
2 6
3 9
What I want the UDF to do, is using the @Id parameter in the UDF, select out the row that matches...
I have an operation I want to perform in a stored procedure. I am building a temp table that gradually gets larger. Now, what I want to do is this;
I have found some literature on the "while" statement, which sets a condition for a chunk of SQL to be repeated until a condition is...
I have a table that is structured like this;
Table1 (
Id Int Not autonumber
RecordNumber Int autonumber Primary Key
AcctNumber Int
Quantity Int
Length float
Width float
Height float
Type int * determines the type of storage (bay, shelf, or...
I have a form, broken down into columns of varying numbers of text boxes. The columns cannot total to greater than 100%. But all fields are not required. Here is how I do my validation:
function hiddenForm_OnSubmit()
{
var returnValue;
if ((document.form.fieldname.value > 100) ||...
I use the following function to disable the submit button, so a user cannot click it twice:
function disable()
{
document.form1.submit.disabled = true;
document.form1.submit.value = "Edit Project";
}
And I call it this way:
<form method="post"...
This isn't as easy as the title makes it out to sound. I have a table, which we will call Table1. Table one is structured like this;
Id (Primary Key, Unique Identity, Integer)
ID_2 (Foriegn Key, Integer)
Space1 (Integer)
Space2 (Integer)
Space3 (Integer)
Now, the Foriegn Key, ID_2, should...
I have a page, where some of the text will be a clickable link, that brings up a popup window. When the user clicks on the link, and the popup window opens, all the values from the text boxes are brought into the page, via the querystring. To get the value of the box in question, I use this...
I have a page that has some text boxes on it, with a description of the text box next to it. Some of those descriptions are hyperlinks, based on certain conditions. When the user clicks on one of the hyperlinks, a popup window comes up, and users can enter more detailed data, regarding that...
If a cookie is created on a page that is done in ASP 3.0, using VBScript, can that same cookie be called in a .NET page, using VB.Net? What about vice versa? A .NET cookie being called in an ASP 3.0 page? Thanks for your help.
I have a text box, that you input a date into (eg: 1/2/2003), and then the user will hit a submit button. If the date is in the future, the page will post a message saying you cannot enter data for a future date.
Here is the code I'm using: The name of the text box is Activity_Date...
Is there a legal, and free, way to download the SQL 2000 database connectivity tools for free? Our company is about to start using a software package, that requires the connectivity tools in SQL, but we don't have enough licenses to go around (we will need at a minimum 24). The connectivity...
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.