Whats Wrong With This Query?

Aug 15, 2006

trying to create a table using a query, and I'm not sure whats wrong with this query:

CREATE TABLE FYIAdmin
(
FYI_ID COUNTER CONSTRAINT PRIMARY KEY,
FYI_Title varchar(100),
FYI_Text memo,
FYI_Date date
)

Sorry it its noobish :(

View Replies


ADVERTISEMENT

Whats Going Wrong

Jul 3, 2007

I am trying to do a partial duplication query. this is the code from the SQL view in accessSELECT filtered1.Company_NameFROM filtered1WHERE (((filtered1.Company_Name) In (SELECT [Company_Name] FROM [filtered1] As Tmp GROUP BY [Company_Name], Left([Company_Name],7) HAVING Count(*)>1 And Left([Company_Name],7) = Left([filtered1].[Company_Name],7))))ORDER BY filtered1.Company_Name;the table filtered1 has 1300 records, under the field Company_Name.the 7's apparently should get it to compare the first 7 letters, and if the same show me them. A whats going wrong, its not showing me any, asthough there are none, (which i know there are) and B. How would i get it to compare the first 7 letters across tables, with fields of the same name?thanksalex

View 3 Replies View Related

Whats Wrong?

Jan 19, 2005

Private Sub Save_Click()

Dim sSemester As String

sSemester = Semester1.value

DoCmd.RunSQL "INSERT INTO Hours (Semester) " & _
" VALUES('" + [sSemester] + "'); "

End Sub

keep getting syntax error
basically Semester1 is a text box with an input mask : LLL???" '"00;0;

View 6 Replies View Related

Whats Wrong?!

Feb 25, 2005

"Microsoft JScript runtime error 'null' is null or not an object line = 126, col = 7 (line is offset from the start of the script block). Error returned from property or method call." what does that mean?

View 1 Replies View Related

Whats Wrong With This Formula?

Oct 23, 2005

As state above that whats wrong with the following formula?

=iff([Product]=Home,1,0)

:confused:

View 2 Replies View Related

Whats Wrong With This Sql Statement?

Sep 1, 2005

SELECT Fields
FROM table1 RIGHT JOIN table2 ON table1.Pubid = table2.PubID
WHERE (table1.PubType=[Forms]![frmCirculationByTitle]![comMemberType] Or [Forms]![frmCirculationByTitle]![comMemberType] Is null)
AND (table2.lAuditPeriod=[Forms]![frmCirculationByTitle]![comStartPeriod] Or [Forms]![frmCirculationByTitle]![comStartPeriod] IS null)
And (table2.lAuditPeriod=[Forms]![frmCirculationByTitle]![comEndPeriod] Or [Forms]![frmCirculationByTitle]![comEndPeriod] is null)
AND (table2.Unfinancial=[Forms]![frmCirculationByTitle]![chkCurrent] Or [Forms]![frmCirculationByTitle]![chkCurrent] IS null);

even if i only have one parameter (a member type, which should bring back at least 20 for each type of member) it returns nothing. if i do the same sql statement in a query and hard codee the value in i get data. it seems to be ignoring whatever is on the form.

*shrug*

%simon

View 2 Replies View Related

Whats Wrong With This Code

Jul 11, 2006

I placed a combo box named CboSearchItem on form to select and bring the record onto the form. Its working smoothly.

Set rst1 = CurrentDb.OpenRecordset("Select * From Product_Master " & _
"where Productname= " & """" & CboSearchItem & """")

But when data in field 'ProductName' contains " mark, it produces error 3075 :

Syntax error in string in query expression "ProductName = "Hose White 3/4"'"

When I replaced all " mark from the data / record, it works fine.
For example Product Name are as follows:

Elbow 2 Way
ABC Pipe 3"
Shower Pipe 1 1/5 Meter

Reading all the above record but not the second one because it contains " mark.

I can not tell my client not to use " symbol while entering the product name. There should be a solution.

Please extend your help.

With kind regards,
Ashfaque

View 6 Replies View Related

Help Needed Urgently - Whats Wrong In This SQL Statement

Mar 11, 2006

SELECT (Max(ReferenceDescription.ReferenceID))
FROM (ReferenceDescription)
WHERE (ReferenceDescription.ReferenceID >= (ReferenceDescription.CategoryID * ReferenceDescription.DepartmentID) AND ReferenceDescription.ReferenceID <= (INT(ReferenceDescription.CategoryID * ReferenceDescription.DepartmentID * 0.9999))

View 1 Replies View Related

Whats The Best Way To Do This?

Jun 13, 2007

Hello,

I have a database which every week I have to import an excel spreadsheet. Now this spread sheet will always have rows that repeat and will have somewhere between 700-1500 rows.

What is my best option to delete the rows that repeat? Meaning if a rows 1-10 have the same data then delete 9 of them. It will vary but I only need the unique record and the others can be deleted.

Would this be best way using a query? VB or something else?

There are 6 columns that will always be in the spreadsheet with the same column names:

ACCT_NUMBER
SHORT_ACCOUNT_TITLE
CONTACT_COMMENTS
CONTACT_TYPE_TEXT
ENTERED_BY
INITIAL_CONTACT_DATE
DATE_ENTERED

There will be rows that will repeat on every spreadsheet everytime. The only column that will not repeat will be CONTACT_COMMENTS. This column is needs to be deleted everytime.

I guess I didnt know if when I import the spreadsheet if something was possible that would:

Delete the CONTACT_COMMENTS then delete the duplicate rows upon importing or even after since this will have to be done everytime.

Thanks.

View 4 Replies View Related

Whats Your Price?

Jan 2, 2006

After being a member on this site for a while now I would like to get some opinions on "cost of application development" I know the forum covers a wide geographic area and the members cover a wide spectrum of degrees of expertise on Access and application development. So the question is this..What would your rates be and how would you determine your charges for developing Access applications for a business?PS... Please include your location if not in your profile.

View 13 Replies View Related

Whats Your Thought On This?

Aug 30, 2004

If I am going to get a Invoice/Statement programme made for me should it be in MS Access or Visual Basic, Thanks for your thoughts, Bob Vance

View 2 Replies View Related

What Is Wrong With This Query?

Jan 15, 2007

SELECT s.weekth, s.contracttype, sum(case when s.[contract status]='advance complete' then price end)/sum([purchaing price])

from submissionandpd as s

THX

View 5 Replies View Related

What Wrong With This Query

Jan 22, 2007

t2 is a subset of t1, I want t1-t2.
but following code does not seem to work.


SELECT *
FROM t1
except
select *
from t2

How to fix this problem? Thanks.

View 1 Replies View Related

What Is Wrong With This Query?

Mar 14, 2007

SELECT Orders.DelAdd1 AS Street, Orders.DelAdd2 AS [Street 2], Orders.DelTown AS Town, Orders.DelCounty AS County, Orders.DelPostcode AS Postcode, Sandwich.SandwichName AS Sandwich, sum(Orderline.Quantity) AS Quantity
FROM Orders, Orderline, Sandwich
WHERE Orderline.Sandwichno=Orders.SandwichNo and Orders.DeliveryDate=[Please enter Today's Date]
GROUP BY Orders.DelPostcode;

It says I've not specified street as an aggregate function, but I don't want to!

View 1 Replies View Related

What Wrong With My Query

May 15, 2007

Hi Guys,

what could be the probelm with my query? Here:
******************
SELECT tblPartnerProfile.PartnerType AS [Org Type], tblPartnerProfile.PartnerName, tblPartnerProfile.PartnerLoc1, tblPartnerProfile.PartnerStatus AS Status, Count(PartnerType) AS TotalType,
FROM tblPartnerProfile
WHERE PartnerLoc1 = 1 OR PartnerLoc1 = 2
******************************
I would like to have it give a count of how many [Org Type] 1 and 2 for Loc1 1 and Loc2 2.

Thanks in advance,

Samia

View 4 Replies View Related

What Is Wrong With This Query

Jul 24, 2007

Hello,
I have a Query that I wrote as follows:

SELECT [TableA].[FieldA], [TableA].[FieldB], TableB.FieldC
FROM [TableA],TableB
RIGHT JOIN [TableA] ON [TableA].[FieldB] = TableB.[FieldD]
GROUP BY [TableA].[FieldA], [TableA].[FieldB], TableB.FieldC;

What happened was that TableA has Fields A and B, and Table B has a field C and D. Tables B and D have the same content (Not necessary unique) and I would like to see a mapping from Field A -> Field C by joining on Field B and D.

However, when I ran it, I got an "invalid arguement" error.

Could anyone help? Thanks a lot!


Regards,
Anyi

View 1 Replies View Related

Whats Controlling These Decimals?

Jan 5, 2007

Hello,

Dont understand what is controlling these decimals. I dont need any decimals for this database. The currency is talking bout money in 1000's and the probability is whole numbers.

Here is where I cant get the decimals to stop:

http://img80.imageshack.us/img80/3685/untitled2pl2.png
http://img77.imageshack.us/img77/6276/untitled3pa6.png
http://img208.imageshack.us/img208/2047/untitled3lk8.png

I have tried different things but no luck...anyone have any suggestions.

Thanks.

View 10 Replies View Related

Whats Better For Database Design?

Aug 17, 2007

I need to store a question like...

I felt scared...
[]Before I was on the roller coaster
[]When I was on the roller coaster
[]After I was on the roller coaster

I need to be able to query/search the database for people that were scared "before", "during", "after", "before and during", "before and after", "during and after". Then I can categorize these people. What would be the best way to do it? Should I have 3 "yes/no" fields in my table, or one text field with those 3 as the lookup field? What one would make organizing the people easier? :D Thanks!

View 7 Replies View Related

Whats Better For Database Design?

Aug 17, 2007

I need to store a question like...

I felt scared...
[]Before I was on the roller coaster
[]When I was on the roller coaster
[]After I was on the roller coaster

I need to be able to query/search the database for people that were scared "before", "during", "after", "before and during", "before and after", "during and after". Then I can categorize these people. What would be the best way to do it? Should I have 3 "yes/no" fields in my table, or one text field with those 3 as the lookup field? What one would make organizing the people easier?

View 1 Replies View Related

Update Query Gone Wrong

Dec 7, 2005

please help, i have a form where i enter goods recieved vouchers,in this form if the cost price on the form is higher than the price in the Stock table then the price must be updated, if the price is lower then the price in the stock table doesnt need to be updated.
I have a method which i have used before with no errors:
i run an if statement on my Lost Focus() event procedure on TxtCostPrice
it looks like this:

Sub txtCostPrice_LostFocus ()
Dim Cost1 As String
Dim Cost2 As String
Cost1 = txtCostPerUnit
Cost2 = DLookup("price", "Stock Numbers")

If Cost1 < Cost2 Then

Dim DocName As String
DocName = "updateIfCostPrice"
DoCmd OpenQuery DocName, A_NORMAL, A_EDIT

MsgBox "Cost price has been updated"

ElseIf Cost1 > Cost2 Then
MsgBox "Cost price does not need to be updated"

End If

End Sub
this code links me to my update query, everything on my update query looks fine but when i run the code it doesnt seem to be updating.

Please help as my deadline is fast approaching at an arlaming speed!

View 5 Replies View Related

Wrong Data In Query

Jan 4, 2006

I am not sure how this query I made is pulling up wrong data. Everything else is fine, except for 1 row of data. It is supposed to pull how many demonstations were scheduled for that day and how many were executed. It comes up with 4 demos and 8 executed. That can't be right. I checked it with the actual data and there are 6 demos total and 4 executed. Anyone know what could be going on there? For the other 30 something records it works just fine.

SQL:
SELECT [Promo count].PromoNo, [Promo count].[# of Demos], Count(DemoOrder.Status) AS CountOfStatus, CountOfStatus/[# of Demos] AS Percentage
FROM [Promo count] INNER JOIN DemoOrder ON [Promo count].PromoNo = DemoOrder.PromoNo
WHERE (((DemoOrder.Status)="E"))
GROUP BY [Promo count].PromoNo, [Promo count].[# of Demos];

View 1 Replies View Related

Wrong Query Return

Feb 14, 2006

I placed ="G*" in a text field to get all names that begin with G and a blank return was issued. Maybe the manual I have has the wrong info. I have Access 2003 and a Access 2000 manual. Please help.

View 1 Replies View Related

Switchboard Whats The Real Advantage?

Jan 25, 2007

Hello,

My database is due tommorrow and my switchboard has gone crazy on me, it doesnt work anymore. When you scrolll your mouse it then goes through the links thats the only way to get to the section you want.

So question is this, whats the advantage of using it?

Cant I just set some hyperlinks to the items I want and it would be the same. Wondering cause dont know if I should spend time trying to fix it or just make hyperlinks...and its due tommorrow.

Thanks for any opinions.

View 12 Replies View Related

Union Select Query (What Am I Doing Wrong)

May 28, 2006

Please see attached database

If you open the form called people you will see a command button
Called add charge once pressed will open a form called charge

On the Bill To combo Box I have the following Union Select Query

SELECT PrimaryInsurance, PersonID FROM tblpeople UNION Select SecondaryInsurance, PersonID FROM tblPeople

What I want the bill to combo box to display is only the Insurances that are related to the
Patient that the charge is for and not to display other patients insurances


Any Ideas

View 2 Replies View Related

Some Record Not Showing On Query.something Wrong?

Oct 27, 2007

I have make relational table on query, but some record not sohowing on query, although i have the record on table.

for example, i can't see the record with code :
131401.007
541000.00*

is the anything wrong?

thanks

View 3 Replies View Related

Query Returns WRONG FIELD!!!

Nov 9, 2007

This is at least the 3rd time I've come across something that is, to me, an extremely serious bug in Access. Anyone else seen this, and anything I can do to avoid it??
In a query, I ask for the values from Field A.
The query returns the values from Field B, but still calls it Field A.

This is in a fairly complex query. If I delete one particular field from the query, the bug disappears. If I put that field back, the bug returns.

Here is my current query:
SELECT ByPN_1.PartNumber, ByPN_1.LostPerSetup, ByPN_1.ActualMachine, ByPN_1.PermQty, ByPN_1.FirstOfFeederSize, ByPN_1.Leaf1, ByPN_1.FirstOfType, ByPN_1.NonPerm, IIf([nonperm]*[concurrentsetups]<1,1,CLng([nonperm]*[concurrentsetups])) AS QtyIfDed, [nonperm]*[setupsperday] AS MaxLoadsSavedPerDay, [qtyifded]*[setupsperday]/[concurrentsetups] AS DedLoadsSavedPerDay, IIf([maxloadssavedperday]<[dedloadssavedperday],[maxloadssavedperday],[dedloadssavedperday]) AS LoadsSavedPerDay, [loadssavedperday]*[laborrate]*[loadunloadperfeeder]*250/60 AS Labor_Annual, master_attr.STD_COST, [loadssavedperday]*[lostpersetup]*[std_cost]*250 AS Parts_Annual
FROM (ByPN_1 LEFT JOIN FeederCost1 ON (ByPN_1.ActualMachine = FeederCost1.Machine) AND (ByPN_1.FirstOfFeederSize = FeederCost1.Size) AND (ByPN_1.FirstOfType = FeederCost1.Type)) LEFT JOIN master_attr ON ByPN_1.PartNumber = master_attr.ITEM
WHERE (((ByPN_1.PartNumber)=107573));

HEre's the pertinent part of the record from BYPN_1:
PartNumberLostPerSetupFirstOfFeederSize
107573 3 12X4

But here's what the query returns:
PartNumberLostPerSetupFirstOfFeederSize
107573 12X4 12X4

Now, if I just delete the "parts_annual" field from the query:
SELECT ByPN_1.PartNumber, ByPN_1.LostPerSetup, ByPN_1.FirstOfFeederSize, ByPN_1.ActualMachine, ByPN_1.PermQty, ByPN_1.Leaf1, ByPN_1.FirstOfType, ByPN_1.NonPerm, IIf([nonperm]*[concurrentsetups]<1,1,CLng([nonperm]*[concurrentsetups])) AS QtyIfDed, [nonperm]*[setupsperday] AS MaxLoadsSavedPerDay, [qtyifded]*[setupsperday]/[concurrentsetups] AS DedLoadsSavedPerDay, IIf([maxloadssavedperday]<[dedloadssavedperday],[maxloadssavedperday],[dedloadssavedperday]) AS LoadsSavedPerDay, [loadssavedperday]*[laborrate]*[loadunloadperfeeder]*250/60 AS Labor_Annual, master_attr.STD_COST
FROM (ByPN_1 LEFT JOIN FeederCost1 ON (ByPN_1.ActualMachine = FeederCost1.Machine) AND (ByPN_1.FirstOfFeederSize = FeederCost1.Size) AND (ByPN_1.FirstOfType = FeederCost1.Type)) LEFT JOIN master_attr ON ByPN_1.PartNumber = master_attr.ITEM
WHERE (((ByPN_1.PartNumber)=107573));

Now the query returns what I expect:
PartNumberLostPerSetupFirstOfFeederSize
107573 3 12X4

View 14 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved