Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: tnguyen315
  • Content: Threads
  • Order by date
  1. tnguyen315

    Please help with Access query with groupby on Union All query.

    Hello, I created an access query with union. Everything is working fine now. But i would like to eliminate the duplicate records if more than one have the same Full street address. Here is my query: SELECT tableA.LOW_Right as From, tableA.UP_Right AS To, 1 AS Status, tableA.STREET AS...
  2. tnguyen315

    When was my SQL Server Databases last accessed/used?

    Please help. I have SQL server 2000 and trying to migrate to either 2008 R2 or 2012. However, I have tons of databases in SQL Server 2000. Is there any sample script that i can use to find out the last accessed date of the SQL Server databases? I need to know if the databases are in use or if...
  3. tnguyen315

    please help with subqueries

    I'm using SQL 2008 R2, i have a query SELECT Mpfile.PATIENT_NO AS [Patient No.], Padfile.CLINIC AS Clinic, Tbclinic.DESCRIPTION AS ClinicDesc, Padfile.APPT_DATE, Padfile.TYPE AS Type, Padfile.DISPOSITION AS Status FROM dbo.MPFILE AS Mpfile INNER JOIN...
  4. tnguyen315

    How to check on date time stamp when record has been inserted into table

    I'm using SQL server 2008 R2. I have an "Employee" table with no date time stamp column. I would like to track down the initial date time stamp when each employee has been inserted into table. I know that if i add a new column with Getdate() function, this date is just apply for new record only...
  5. tnguyen315

    Error on update SQL view, please help

    I'm using SQL 2008 R2. I'm trying to update the MAX record from another table to the view but got error. Error "Msg 4406, Level 16, State 1, Line 1 Update or insert of view or function 'dbo.V_Notes_1' failed because it contains a derived or constant field." My code: UPDATE dbo.V_Notes_1 SET...
  6. tnguyen315

    SQL query to return a column of previous date

    Let me explain this, the query result: ID VisitDate 125 1/1/2012 125 8/25/2012 125 1/8/2013 257 6/7/2012 257 9/15/2012 257 3/15/2013 257 6/1/2013 Now i would like to create another new column call "Previous Date" and pull data from VisitDate such as: ID...
  7. tnguyen315

    how to execute stored procedure from access vba using DAO with trusted connection, ODBC, DSN = 'DTe'

    This is the stored procedure: SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[sp_ResendPayEmail] ( @id int ) AS DECLARE @operatorname AS nvarchar(100), @operatoremail AS nvarchar(100), @title AS nvarchar(100), @message AS nvarchar(max), @webpermitid AS int --CHECK...
  8. tnguyen315

    Error in updating SQL statement, The multi-part identifier could not be bound.

    Hello, I tried to run the update state but i got errors and couldn't figure out what's wrong, please help. Thanks in advance. TN Here's my code: --Update Title X - addnote field update ENHFILE set e.X12_ADD_NOTE = ( select distinct case when RACE = 'A' then '5' when RACE = 'B' then...
  9. tnguyen315

    Error in update SQL statement, The multi-part identifier could not be bound.

    Hello, I tried to run the update state but i got errors and couldn't figure out what's wrong, please help. Thanks in advance. TN Here's my code: --Update Title X - addnote field update ENHFILE set e.X12_ADD_NOTE = ( select distinct case when RACE = 'A' then '5' when RACE = 'B' then '2' when...
  10. tnguyen315

    Import full path of photos into OLE OBJECT data type

    Hello all, I have an access 2010 frontend and Sql server 2008 backend. I was wondering, if I have a csv file containing a the full file path to a lot of photos, the case numbers that the photos are associated with, and the name I would like for each of the photos, Is there a way to import the...
  11. tnguyen315

    please help with IIF statement on access query

    Hello all, I'm using access 2010, I would like to compare 2 dates to get the status... Date1, Date1_Inserted, Date2, Date2_Inserted. If Date1 = blank and Date2= blank then group1 If Date1 > Date2 then group1 If Date1< Date2 then group2 If Date1 <> Blank and Date2 = blank then group1 If Date1=...
  12. tnguyen315

    MS Access 2010 vba got error on either move or delete folder - run time error 70, permission denied

    I have an access database and it's been working for years, suddenly my code stop working on movefolder ....I have full control on admin... I tried to search but nothing works, please help... My code: Private Sub cmdClose_Click() Dim dest As String Dim NewDest As String Dim...
  13. tnguyen315

    please help on syntax '3075' error (missing operator) in query expression ...double quote

    My code: Dim DQ As String DQ = """" strSQL = "INSERT INTO " _ & "Audit (EditDate, InsertedBy, RecordID, RecordDate, SourceTable, " _ & " SourceField, BeforeValue, AfterValue, ComputerName, UserDomain, UserProfile) " _...
  14. tnguyen315

    please help with distinct count on group

    This is my query: SELECT Establishment_Information_remote.District_number AS [District#], Inspections_remote.Establishment_code AS EstCode, Inspections_remote.Date_of_Inspection AS [Date], Inspections_remote.Inspection_type_Code AS TypeCode, Risk_Type_remote.Frequency_of_inspection AS...
  15. tnguyen315

    copy most current records from table to sub form

    Please help, I'm very appreciated... Thank you very much. I have a main form with several sub forms, each sub form on each tab. The main form has a button "Add New". So when hitting the "Add New" button to add a new record, then the second sub form should be automatical inserted the most...
  16. tnguyen315

    Combine multiple rows into one line

    Please help, thanks. I have a table results: DocNo DocLine ItemID Code Value 733 1 28375 ExpDate 01/01/03 733 1 28375 MFGINV Organ 733 1 28375 UOI CY 733 2 97582...
  17. tnguyen315

    supress supreport

    Hello, I have a main report (crystal report xi) with several subreports on it. For instance I have a supreport1 and supreport2, is it possible to supress the supreport2 if supress1 HAS DATA, show supreport2 if supreport1 is blank? Thank you very much for your help. I'm very appreciated. Again...
  18. tnguyen315

    Split single text field of one records into multiple records

    Hello, I'm using access 2007 and I have a table called "tblArea", this table has 2 text fields named "Code" and "Area" Results: Code Area 1 15 1 27&48 2 37 & 52 3 45A, 51 My question is how I can split the area field into multiple records such as: Code Area 1...
  19. tnguyen315

    Select Multiple values in Drop down box

    Hi all, I created a form in access 2007 font end and SQL 2008 back end. How do I create a combo box with selecting multiple values. For instance, I have a table named "tblEmployeeInfo" and a drop down table named "tblSalesRegion". "tblEmployeeInfo" has a field name "SalesRegion"...
  20. tnguyen315

    please help on query with criterias

    I have a query join from 3 tables...results on this query range from 3/1/09 to 3/1/11: EstCode EstName EstType VioNum Date 340 EstA 10 2 3/1/09 340 EstA 10 2 5/5/09 340 EstA 10 2 6/9/10 340 EstA 10 2 12/7/10 341 EstB 11 5 3/28/10 341 EstB 11 5...

Part and Inventory Search

Back
Top