Failed to compare dates in a stored process?

Updated on technology 2024-02-09
13 answers
  1. Anonymous users2024-02-05

    Since the stored procedure gets the correct result, the problem is definitely not the stored procedure's problem;

    Try to check the part of the system you are developing that binds the data source, check the process, for example, you can first set a breakpoint on the statement that binds the datagrid data source to see if the value of the data source is the required value. Then if it is, start trying to run the checks step by step in the program, and you'll know. The main thing is that I don't know what system you developed with, otherwise you can give better advice.

  2. Anonymous users2024-02-04

    The stored procedure does not return a dataset.

    So the datagrid you bind won't have data.

    You can try to write it as a function.

    create function [dbo].[function name]startdate datetime, @enddate datetime

    returns table

    asreturn

    select *

    from yhzh

    where paybackdate>@startdate and paybackdate<@enddate)

    Gosql Enter select * from function name ('12/31/2009', '12/31/2010')

  3. Anonymous users2024-02-03

    Although I'm not familiar with C, the sentence upstairs that the stored procedure does not return the result set is wrong, and the owner's process returns the result set.

  4. Anonymous users2024-02-02

    In SQL Server, you need to add " to the date value'Such as:

    down_list_update 3," & tdate & "," & cint(request("id")))

    Instead:"down_list_update 3,'" & tdate & "'," & cint(request("id")))

  5. Anonymous users2024-02-01

    Your string doesn't meet the date format, and there's a problem with the conversion.

  6. Anonymous users2024-01-31

    If it is a character type, add extra single quotation marks to the concatenation.

    set @s = 'select top 10 * from t_position where adddate<'''+@t+''''

  7. Anonymous users2024-01-30

    Only compare"Hours, minutes, seconds"part of the words.

    Directly to char(Date 1,'hh24miss'>to char(date 2,'hh24miss')

    This way to compare.

    If you want to compare dates, then directly.

    Date 1 > Date 2

    This way to compare.

  8. Anonymous users2024-01-29

    Enter the formula =today() in excel.

  9. Anonymous users2024-01-28

    There are many issues to be aware of.

    Depending on what you're inserting, if you don't need things, I recommend using @@raiserror system-defined global variables to increase the level of error messages, so that inserting errors is more intuitive!

  10. Anonymous users2024-01-27

    Enter show error to see ** is wrong;

    update fang_product

    set fang_ = ,fang_ = 0

    where uuid = ;

    goto nextrow;

    Can the update statement be used like this?

    Add a comma to one field and another field.

  11. Anonymous users2024-01-26

    Did you get an error when you executed it?

  12. Anonymous users2024-01-25

    The error is basically that the column does not exist in the selected table, and SAP acknowledges the status. Distinguish between votes, are these listings existing or garbled? If the actual column name is this suggestion, for each table, the column is in parentheses, [SAP Join Admit Status].

    Ticket distinction] in this way.

  13. Anonymous users2024-01-24

    See Chinese, this should be noted in the oracle. Don't use Chinese fields.

Related questions
4 answers2024-02-09

The solution is as follows: 1. The create global temporary table t temp statement is to create a temporary table, there are two kinds of temporary tables created in oracle, one is transaction-level and the other is session-level, when the creation of temporary table statement is followed by on commit delete rows, it means that the temporary table is transaction-level, and when on commit preserve rows it means that the temporary table is session-level. >>>More

14 answers2024-02-09

Create table as **selectThe table should exist in the data dictionary, so that the table can be created successfully, you have a complex subquery, such as count(*)as samplid, how does the database know whether samplid should be created as int or bigint? It is recommended that you split the dynamic statement into two statements, one for the regular table creation statement and the other for the insert statement.

11 answers2024-02-09

Visually, your stored procedure needs to run at these moments: >>>More

10 answers2024-02-09

The timed view function is realized, first save the required two (or more) perspectives in the model, --- the animation --- timed view in the menu, open the dialog box, select the perspective to be observed and the time when the event occurred, apply, OK.

8 answers2024-02-09

Master the basic syntax, look at the implementation of functional requirements, and take a look at the well-written examples.