subquery

  1. J

    adding subquery in insert into

    "insert into temp_cost(RecordID,ClassID, Classtype, ClassName, TypeOrder, CreateDate) values('" & strRecordID &"','"& strClassID &"','"& strClassType & "', '" & strClassName & "', '" & strTypeorder & "', '" & strCreateDate & "')" This code works, but I am trying to add a subquery to auto...
  2. A

    Subquery To Select Checks by Varying Age Requirements

    Hi all, I have a need to select all checks that fall within an age threshold determined by a client's preference. For example, one client might choose a 30 day threshold, another might choose every ninety days. I am receiving an error: "at most one record can be returned by this subquery."...
  3. M

    Display a list of Oldest Orders for each Customer

    I'm trying to create a list of all the oldest orders my customer has. but I can't seem to get my subquery to list one record for each CustomerID. Whenever I add the Order Amount to the subquery every orders lists. I have these tables tblCustomers - Customer ID, Customer Name, etc...
  4. S

    Having Subquery Trouble

    I have the following query: <tbody> Item No Item Class Dept Code Quantity 0001 Raw Material 1 50 0001 Raw Material 2 30 0002 Raw Material 3 100 0003 Raw Material 1 75 0003 Raw Material 2 100 0003 Raw Material 3 20 0004 WIP Item 4 100 0005 WIP Item 4 100 0005 WIP Item 5 175...
  5. P

    Using subquery in a join statement in ADO SQL Excel VBA

    Hi everyone - if anyone can figure out what is wrong with my sqlstatement here because I'm really out of ideas on how to resolve this, i have scoured the net for days already. Here's the query: SELECT Sup.[SAP ID] FROM [Supply$] AS [Sup] LEFT JOIN [Demand$] AS [Dem] ON (Sup.[Career Level] IN...
  6. J

    Access 2003 Left Join with Subquery Confusion

    I'm trying to use a Left Join to a subquery in Access 2003 and it isn't working as expected. When I run the subquery by itself it returns the expected results. Here's the subquery: SELECT 'T0901' AS TestNumber , NAME AS TestName , TUBE AS SOFTTube , '0901 -- ' & [ID] & ' / ' & [NAME] AS TestID...
  7. P

    Need to Convert this Formula to an Access Database...

    =IF(OR(WEEKDAY(CX1480,2)=6,WEEKDAY(CX1480,2)=7,COUNTIF('C:\Documents and Settings\karuppsp\Desktop\My Projects\SLA - C11\[Holiday Calendar FR Freight.xlsx]Holiday Calendar FR Freight'!$D$5:$D$14,CX1480)>0),TRUE,FALSE) I have created the Holiday Calendar in a table named Holidays. I know I have...
  8. J

    Trying to create a running total of invoices

    Hello, Message Board: I have a table with invoice details. I'm trying to create a query that will summarize the total $ of invoices by month. I created a field that will give me the month end date based off the invoice date field using the dateserial function (ie and invoice with a date of...
  9. K

    Reserved error -3025

    I've got a database which imports 2 text files into temp tables, appends them to a single large table, and then drops the temp tables. That bit works perfectly. I'm now trying to add some form of logging to this. My idea was to make a logging table, and call a query which would capture the...
  10. I

    Subquery

    Hi Alls Just the basic questions, I'm trying to get the result from the EMP table. I can get the max(sal) from each deptno, but I would like to see the max(sal) from which department. <TABLE cellSpacing=0 bgColor=#ffffff border=1><CAPTION> Query21 </CAPTION><THEAD><TR><TH...
  11. J

    subquery question

    I have a large access table that contains the following: <TABLE style="WIDTH: 199pt; BORDER-COLLAPSE: collapse" border=0 cellSpacing=0 cellPadding=0 width=264><COLGROUP><COL style="WIDTH: 59pt; mso-width-source: userset; mso-width-alt: 2852" width=78><COL style="WIDTH: 67pt; mso-width-source...
  12. I

    Maximu value along with all fields value

    <TABLE cellSpacing=0 bgColor=#ffffff border=1><CAPTION>qryMax No of procedures</CAPTION><THEAD><TR><TH borderColor=#000000 bgColor=#c0c0c0>InternalNo</TH><TH borderColor=#000000 bgColor=#c0c0c0>EpisodeNo</TH><TH borderColor=#000000 bgColor=#c0c0c0>All_Proc</TH><TH borderColor=#000000...
  13. S

    Microsoft Query - subquery alias

    Hi, I've had this problem for a while and I haven't seen any answers to it yet. Hope you guys know better: I'm trying to get information to Excel by using an SQL statement that is run in Microsoft Query. Seems that MS Query doesn't follow SQL standards, because the following query gives me this...

Some videos you may like

This Week's Hot Topics

Top