I have sprocs that execute sql statements stored as a string, i.e.:
CREATE PROCEDURE dbo.SprocName
AS
set nocount on
declare @SQL as varchar (2000)
set @SQL = 'SELECT yada yada etc.'
exec(@SQL)
Using the above procedure, I need to be able to check for null values the query may be returning...
I need to concatenate into a string used as a select statement that creates a view, and I'm finding it doesn't like the syntax I am using. I already use the same syntax in a case when construct with no problem.
Declare @SQL as varchar(2000)
Set @SQL = 'Select FieldName From...' etc
Declare...
Among other fields, there are seven in my table that could potentially contain 8,000 characters each and I am concerned about the memory size that any given row will take. I don't want to go over the memory limit. I understand that the Text datatype actually uses multiple data pages in the...
How do I query a text field to determine the maximum number of characters entered into it among all the records? Does SQL have an equivalent for a VBA Len() function?
Thanks!
How do I get a pass through query to accept input parameters? I have no problem using the syntax below in regular SQL queries and it prompts the user for the information, but it isn't liking this in a pass through for some reason.
--Input Parameters
@Value1 varchar(500),
@Value2 varchar(2)
AS...
I need to make a standard CSV file out of a spreadsheet. The spreadsheet is nothing but basic row-headers with values going down. Nothing unusual. I go to file - save as - CSV... it gives me a couple messages I click through, then... the file extension is changed to .csv, but nothing else...
I've learned that releasing object variables may or may not actually deallocate the memory used by them and I seem to be having a problem with too much memory being used up (even though I've closed recordsets and set things equal to nothing). When the segment of code below runs, the reports all...
I'm trying to use a sproc for a report, but it isn't working. The procedure runs, but gives me a message "The stored procedure executed successfully but did not return records" and, therefore, when the report is based on it, it gives me a message saying "Provider command for child rowset does...
I need to get the DateName(Month, QuotaMonth), where QuotaMonth is only the integer of the month (an integer 1 through 12) and not the entire date. How can I best do this?
Thanks!
I have a bunch of dates currently the first of each month and I need to change them all to the 22nd of the month all at once with an update query. SQL isn't liking the syntax I've tried to specify the new date. What is the syntax to do this? Thanks!
CONVERT (datetime, MONTH(CompletionDate) +...
Is there a built-in sproc I can run to show how much memory a specific table is using and even how much memory the largest record in a table is using? "sp_help TableName" does not show this information.
Thanks!
(Previously posted in SQL forum)
I am trying to execute a simple select query in an ADP file via code and I’m getting an error message saying the sproc has “too many arguments specified”. It’s a very simple query and I don’t see what I’m doing wrong. "Com" is my command object variable and...
I am trying to execute a simple select query in an ADP file via code and I’m getting an error message saying the sproc has “too many arguments specified”. It’s a very simple query and I don’t see what I’m doing wrong. "Com" is my command object variable and "Con" is my connection object...
I made a tiny new .mdb file database (not even 2.5 megs in size) and for some reason it is unbelievably slow. Every little thing I do behind the scenes takes forever: I select a query/form from the database window and click on design veiw, it takes about 20 seconds to finally open. I click on a...
I have a form bound directly to a table and the form has a delete button. I was having issues with the regular menubar delete feature behaving unpredictably, so I coded it myself, but now, it's giving me an runtime error "Could not update; currently locked." If I go to another record, then...
I posted this in another forum first, but perhaps this is a more appropriate place. I tried searching the FAQ and other posts for info on this, which I know people have dealt with before, but could find nothing. I need to be able to merge images (signatures) into reports, but I've heard that...
I tried searching the FAQ and other posts for info on this, which I know people have dealt with before, but could find nothing. I need to be able to merge images (signatures) into reports, but I've heard that saving images in a SQL database isn't such a good idea. I've heard it's better to...
I've coded Outlook to automatically create an email, but I also need it to minimize the email on the task bar. There doesn't appear to be any .minimize method for my email object variable. I've found code to minimize the entire Outlook window, but not an email message. How do I do this? Thanks!
I'm using Access 2K3 to do a mail merge in Word 2K3. I found the code below on Microsoft's site, but need to modify it. I have a .adp file with a SQL back end, however, and need to use a connection string to the server. I cannot simply substitute one in the "Name:" parameter, as it only...
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.