thanks for your perserverance PH.
SELECT tblB.Branch, tblB.Email
FROM tblB
WHERE EXISTS (SELECT * FROM tblA WHERE Left(tblA.[Account Number],3)=tblB.Branch
this worked perfectly!!!!!!!!!!!!!!!!!!!!!
Server: Msg 195, Level 15, State 10, Line 1
'First' is not a recognized function name.
The SQL Server seems to take exception with First as a function name.
I tried:
SELECT DISTINCT tblB.Branch, tblB.Email
FROM tblA INNER JOIN tblB ON Left(tblA.[Account Number],3)= tblB.Branch
The field Email is defined as ntext. Do you suppose this is causing the following error ?
Server: Msg 8163, Level 16, State 3, Line 1
The text, ntext, or image data type...
If I have:
table tblA with a field:
------------------------------------------------
[Account Number] defined as nvarchar 10
table B with 2 fields:
-----------------------------------------
Branch defined as nvarchar 3
Email defined as ntext 16
sample of...
How would you modify the following module to loop through replacing variable intBranch with
variable [Account Number] which is defined as nvarchar 10. The first 3 positions of [Account Number]
are similar to intBranch and contain the values '001' through '999'.
For ex:
[Account Number]
001...
I am creating an Access application using Access as the front end and SQL Server as the backend database.
I have a table named tblA consisting of the following 2 fields:
Branch Customer
---------- --------------
1 121
1 122
1...
I apologize. I should have stated that branch is defined as nvarchar.
Thus, I get the error message:
Invalid operator for data type. Operator equals boolean
AND, type equals navarchar.
Is there a way I can place the following SELECT clause:
SELECT Branch FROM tblBranches ORDER BY Branch
in a Row Source of a List Box and in addition ADD an additional SELECT value of ALL to the tail end of the list.
For example, let's say tblBranches.Branch has values of 101, 102, 103, 104...
If one user of my application clicks on a button to create an Excel file report, my Access application works fine.
However, if that user has the Excel file open and then another uses clicks on a button to create yet another Excel file, I get the error message as follows:
Run time error '2302'...
I would like to send a table which I know has records in it to an Excel spreadsheet and open the spreadsheet for the user. The user could then save the spreadsheet if desired. I tried using the following sub procedure and functions. The Excel file does open but no records are displayed. Instead...
I am using Access as a front end for my application and SQL server as the back end database.
I created a LOGON form with the following sub procedures. When I double click on the ADP file to launch my
Access application, the following line is highlighted in the Form_Open paragraph...
DO you know why I received an error near the Keyword Group in the following:
This was the result of executing a stored procedure comprised of a SQL string.
CREATE TABLE tblFlLN ([First Name] nvarchar(25), [MI] nvarchar(1), [Last Name] nvarchar(25), [Address 1] nvarchar(35), [Address 2]...
In the following Stored Procedure my objective was to select unique Customer Records. I select all the field in the Customer table. However, I can't simply use a SELECT DISCTINT statement because I also SELECT 2 fields from the Product table. There is a 1 to many relationship between the...
The following statement works fine when I use it in an MDB file. However, I converted my Access Application to an ADP and now I get the following error message:
Run time error '91':
Object variable or With block variable not set
The offending line is as follows:
CurrentDb.Execute "UPDATE...
I execute the following stored procedure to create 3 tables. I then created an Access Report and read the last table created named tblRange as the Report: Record Source.
In the Header section, I have 2 text boxes. 1 text box has a control source of DFrC which is a field in tblRange. The other...
How would you write the following query ?
I have a table of Customers AS C with a CustomerNumber (Primary Key) , State , DateA.
I have a table of Products AS P with a CustomerNumber (Foreign Key) and Property Type.
I have a table of StateCodes AS S with a State.
I have a table of...
I execute the following statement to test my stored procedure dbo.FAllStates and function dbo.SPLIT in query analyzer as follows:
EXEC dbo.procFAllStates 2005,'A',NULL,NULL,'''''AL'''',''''AR'''',''''AZ''''',NULL
the result of the generated sql code is as follows: (0 row(s) affected)
SELECT...
I further modified my SELECT INTO clause to incorporate the SPLIT function.
Set @SQL =
'SELECT Null As Title, C.FirstName AS [First Name], C.MiddleInitial AS MI, C.LastName AS [Last Name], C.SecondNameFirst AS [Second Name First], C.SecondNameMid AS [Second Name Mid
INTO...
I am trying to add an array type function named Split into my Access Application as follows:
CREATE FUNCTION SPLIT (
@InputText Varchar(104),
@Delimeter Varchar(10))
RETURNS @Array TABLE (
Value Varchar(4000))
As
BEGIN
DECLARE
@Pos Int,
@End Int,
@TextLength Int,
@DelimLength...
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.