I'm trying to do calculation on two columns within the table.. (DDL for
creating and inserting test data below)
I need to get the difference between the last entry and first entry on the
columns "E" and "M" and it must be grouped by each month. I also need to
ignore the rows where the Total...
I have a situation where I need to see if two certain values are being passed by my app developer via the variable that the stored procedure is using and if the values exists I need to create a flag for each one of them to execute the sp differently and remove the value from the variable.
Hope...
I have two tables that I need to use to create a specific select statement.
One table (AllData) contains approx 45 columns and data in each column. The other table (ColumnList) holds the names of the columns and a flag.
What I need to do is create a select statement against AllData that will...
Here is the DDL that creates the table and some dummy data:
CREATE TABLE [dbo].[Error](
[ErrorID] [int] IDENTITY(1,1) NOT NULL,
[CompanyID] [int] NULL,
[LayoutID] [int] NULL,
[PeriodID] [int] NULL,
[FileID] [int] NULL,
[ProductID] [int] NULL,
[TreatyID] [int] NULL,
[TempErrorTypeID]...
I need to retrieve the full file name of a file that resides within a specific folder. Currently I'm using this code
Dim FileLoc As String, FileName As String
FileLoc = "\\servername\FileLocation\"
FileName = System.IO.Path.GetFileName(FileLoc)...
Does anyone know how I can search the column names of all the tables in a database and see if any of the column names are using SQL Keywords.
I want get a list of the table and column so I can go to that table to rename the column.
Example:
A table name Test has a column named "Name", I...
I'm trying to develop a pass a guid from one table to another since I have to use the same guid for several thousand records, how can I do this? I can't find anything about this
How can I create an array based on a data filed, the field is a string. I'm using CR 9 with data from a SQL 2K Server. I've tried looking for an answer but couldn't find one.
I would like for the array to look like. Each record could have one or more records that need to go into the array...
Can someone help me with creating a dateadd statment that will return today's date three ago and at 11:59 PM
12/19/2002 23:59:59 is the final result
I have the syntax for the year part but not to get it to 23:59:59
SELECT DateAdd(yyyy, -3, CONVERT(smalldatetime, CONVERT(char(10), GETDATE()...
I have the following formula:
stringvar vRENumber := {Rpt_Smaple.RENumber};
If IsNull({Rpt_Sample.StreetDirection}) Then
LTRIM(RTRIM(ToText({Rpt_Sample.StreetNumber},0,'') + ' ' + {Rpt_Sample.StreetName}+ ' ' + {Rpt_Sample.StreetType}))
+ Chr(9) + CHR(9) +'RENumber: '+ vRENumber
Else...
First of all, I hope I don’t confuse anyone with this.
I have two different laptops (different manufacturers), however, both are loaded with XP Pro and Office 2003 Pro.
I have the same access database loaded on both machines.
When I export a report to rtf format from “laptop a” and then open...
I'm trying to use this code to copy data from a table existing on another database to the current database that is calling the code from:
DoCmd.RunSQL "SELECT * INTO Rating IN C:\Documents and Settings\user\Desktop\Test.mdb FROM Rating;"
But I keep getting an error message "Query input must...
I'm sure this has been asked, but I can't find anything on it.
I need to create a stored procedure that will create a list of years from 2004 to 2010, so I can incorporate it in a SQL Reporting Services Report.
Thanks in advance
I have the following code in global.asa file
Sub Session_OnEnd
Response.Redirect "../includes/logoff.asp"
End sub
but I keep getting the following error when the session timeout is reached.
Microsoft VBScript runtime error: Object required: 'Response'
What am I missing or doing...
I'm sure that this has been asked before but I can't find anything. I need to be able to delete nonalphanumeric characters from multiple columns in a single table, how can I do this
My company has just installed a Cisco Aironet 1100 Access Point. I have a laptop with a DLink AirPlus Wireless Card. I can connect to the Access Point but I'm getting an IP address from the AP, therefore unable to access network resources or get out to the internet. I'm new to Cisco so is...
I have a post on Microsoft's Newsgroup - SQL Programming, thought I try here also.
I have the following code that works perfectly, that I got from MS Newsgroup
SELECT U.agent, U.phour,
COUNT(F.agentid),
COALESCE(SUM(CAST(F.pamount AS NUMERIC(10,2))),0),
COALESCE(SUM(CASE...
I have a table that is going to be created everyday via a DTS Package. The naming of the table is "TableName_3_23_2004. I keep getting an error message saying that I must declare the variable @TDATE. This is the code that I'm using.
DECLARE @TDate NVARCHAR(100)
SET @TDate = RTRIM('Table_'...
I'm using VB6 with CR9, I have a report that has a parameter that I'm trying to pass from vb. This is the code that I'm using but it keeps giving me an error stating that subscript is out of range.
The report is in the VB project as a Designer.
CrystalReport2.DiscardSavedData...
I have the following code that I'm using to see if any files with the .txt extension exists. When I run the code it keeps coming back that the file does not exists when in there is a .txt file in the directory.
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
If...
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.