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 Mike Lewis 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: *

  1. mistektips

    Computing Average

    Hi, There are 2 tables: Table A (SecurityID, SecurityName) Table B (SecurityID, Price, ClDate) The query is to find the average price with Name=ABC Corp in year 2005 I wanted to know if this query would be right. If not, then why? select avg(price) from B, A group by securityID having...
  2. mistektips

    Implementing Dynamic Drop-down Menu

    Hi, I am trying to make a dropdown menu which dynamically changes when a selection is made in another menu. So when a selection is made in the menu, another list of dropdown is shown. After the selection is made here, the user needs to click a button(go) and it should take it to the respective...
  3. mistektips

    Convert Numeric to Time

    Hi, There is a field which represents time, got from As400 table which is in numeric format(4283002). I want to convert this to time format(04:28:30) using vb scripts. Is there any cast function which will do this?
  4. mistektips

    Get data from past 5 days

    I tried what flapeyre suggested but I still keep getting errors. This is the error message I get: TOKEN WAS NOT VALID VALID TOKEN: DATA PTH TIME SQLID SCHEMA FUNCTION TIMESTAMP <IDENTIFIER>
  5. mistektips

    Get data from past 5 days

    Hi lkmalee I agree with you that one of the format needs to be converted because the two operands that are compared are in different formats. But I am not sure how to convert the current date to numeric. Basically it has to changed to this format:yyyymmdd. Any help will be appreciated.
  6. mistektips

    get data from past 5 days

    Hi, I have to get data from past 5 days from AS400 table. I tried using this query: SELECT * FROM TESTSQL.C27AUDIT WHERE TESTSQL.C27AUDIT.C0027_DATE >= CURRENT (DATE) - 5 But it gives me an error. Also, I just wanted to clarify that the C0027_DATE field is a numeric field...
  7. mistektips

    Get data from past 5 days

    Hi, I have to get data from past 5 days from AS400 table. I tried using this query: SELECT * FROM TESTSQL.C27AUDIT WHERE TESTSQL.C27AUDIT.C0027_DATE >= CURRENT (DATE) - 5 But it gives me an error. Also, I just wanted to clarify that the C0027_DATE field is a numeric field...
  8. mistektips

    Convert Date Format

    I need to convert date which in this format (mm/dd/yyyy) to (yyyymmdd) format. Can someone suggest? Thanks!
  9. mistektips

    Get data from only past 5 days

    Thanks Vongrunt. However, I am trying to get data from past 5 days from AS/400 database. The date format there is different. So when i tried the above mentioned way, it doesnt work. Could anyone suggest plz?
  10. mistektips

    Get data from only past 5 days

    Hi, I have to write a query which gets data only from past 5 days from a table. This table has a column for date. Could someone suggest how do I write the query. Thanks!
  11. mistektips

    Error: Cdate

    I tried validating using IsDate function: If Not IsDate(DTSSource("A0015_ABOLISH_DATE")) Then processdatef = "01/01/1901" But I am not getting the right result...All the values are displayed as 01/01/1901 How else can i validate this date?
  12. mistektips

    Error: Cdate

    When I try the above, I am getting an error in this line: object required for wscript...
  13. mistektips

    Error: Cdate

    Hi, I am getting 'Type Mismatch: cdate error" when I am running this script... Basically I am using DTS(Sql server) to transfer data... And one of the columns is date... Could someone suggest as to why I am getting an error? Any help will be appreciated. Thanks The script is as follows...
  14. mistektips

    newid() error

    Thanks Denis!
  15. mistektips

    newid() error

    Denis, I tried the first way that you mentioned above: declare @GUID uniqueidentifier select @GUID =newid() exec usp_Insert_Met_File_New @Guid I get this error: Server: Msg 8114, Level 16, State 4, Procedure usp_Insert_Met_File_New, Line 0 Error converting data type uniqueidentifier to char.
  16. mistektips

    newid() error

    In this case, why am i getting an error if i pass newid() to guid while executing the stored proc? this stored proc is going to be used by a front end application and they are going to pass newid() to guid in the application...
  17. mistektips

    newid() error

    Denis, Could you plz tell me why are we passing a null value for guid in the above way of executing the stored proc?
  18. mistektips

    newid() error

    Denis, What should be the format which I run the stored proc if i do NEWID() in the stored proc itself... i tried the following: exec usp_Insert_Met_file_New @guid,null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null...
  19. mistektips

    newid() error

    I tried this... But I get the same error...this time when saving the stored procedure
  20. mistektips

    newid() error

    Hi, I am trying to run this stored procedure, but I am getting an error saying: Server: Msg 170, Level 15, State 1, Line 2 Line 2: Incorrect syntax near ')'. The stored procedure is as follows: CREATE PROCEDURE usp_Insert_Met_File_New @GUID uniqueidentifier, @Class_Code char(5)...

Part and Inventory Search

Back
Top