-
order by is the keyword of sorting, followed by the field, for example: select * from table name order by [ id]asp in the database object to execute this statement to obtain the sorted result set data reference.
-
Sort. Like sorting by latest date or something.
select * from news order by [newsdate] desc
This T-SQL refers to the query of the news in descending order.
select * from news order by [newsdate] asc
This T-SQL refers to querying the news in ascending order (generally the result is queried out in this way by )
-
Sort out the content of your SQL query in order by the field you order by.
DESC descending ASC ascending
-
order by
In order to. Sort by method.
This is the statement of SQL.
Like what. order by name.
It's sorted by name.
-
1. What kind of database is the landlord?,Like the back is generally matched with %.,How do you use *?,I'm very skeptical that your statement can be executed.。
2. The content of your order by is as follows:
fld like '*Guangzhou*') -fld like '*Recruitment*') -fld like '*Exam Papers*')
But a "fld like."'*Guangzhou*'"The expression result is 0 or 1, because your conditional query is and, in fact, the result of these three like expressions is 1, then it is actually order by -3, and there is no sorting effect.
-
Sort order by what you want.
-
Clearly wrong**.
First of all, order by should not be followed by an expression like like .
Second, even if the value after order by is -3 as it says upstairs, then order by -3 desc means sorted in reverse order of column -3. This -3 column is non-existent, syntax error.
-
Is the questioner's question a bit problematic? First of all, what is the data type of your pi itype, what is the data type of ssearchcondition, and what is the data type of pip sort. Different data types are written differently. There are additions and there are additions like this'"&&'There are also those that are added like this"&&" .
-
ssql = "select * from view_productpic where pip_bbigflag=1 and pi_itype=" & pi_itype & ssearchcondition&" order by pip_sort"I don't know about the first floor, please don't talk nonsense.
-
You need to add".""After that, I will add your sentence, and after yours will add it."" ”。
-
is the maximum select top(5) *from (table name) order by id asc
In order, the old ones are on top.
-
dateadd('m',e_date,e_cycle)
Changed to dateadd('m',e_cycle,e_date)
In other words, the last two parameters should be reversed.
-
In most cases, an ASP connection database retrieves data and an order by is added to the SQL statement.
dim id,name,param,rs,sql,sid,order
sid=request("sid")'Parameters submitted by the front-end form page.
id=request("id")
order=request("order")
param=" and id>"&id&" and 1=1 "'Various conditions.
if order="1" then'Customize.
param=param&" order by adddate desc "
else if order="2" then
param=param&" order by id asc"
end if
sql="select * from a where "¶m&""
sql'If there is an error debugging, write down the SQL statement to see if there is an error.
set rs="")
sql,conn,1,1
if and then
nothing"
elsedo while not
loopend if
set rs=nothing
Parameters are written in ajax.
Unfortunately, the one above can also respond to AJAX requests for front-end sorting interactions. The backend is simple, the rest is a matter of front-end JS.
-
If you can't read it, it may be an error. It's hard to say. You can send it up and have a look.
There's nothing wrong with your SQL statement here. You have to see what went wrong to fix it.
-
SQL is no problem.
It should be something else, like a space server problem.
-
The statement is no problem, please check the server disk permission settings, ** directory has writable permissions.
-
Your grammar is wrong.
strsql = "select * from tbproducts where 1=1 order by flag desc"
if request("typeid")<>"" then'If this condition is true.
end if
Then the SQL statement should look like this.
select * from tbproducts where 1=1 order by flag desc and type=value.
order by must be placed at the end of the statement.
It should be changed to this.
strsql="select * from tbproducts where 1=1"
if request("typeid")<>
strsql=strsql&" order by flag desc"
Concatenated strings are best used"&", do not use"+"
If your typeid is an integer, don't put single quotes.
-
Change to: strsql ="select * from tbproducts where 1=1 "
if request("typeid")<>"" thenend if
strsql=strsql+" order by flag desc"
Try to make an error, it should be that the value of the typeid is not passed, check the parent page with parameters.
-
That's going to be a problem.
strsql = "select * from tbproducts where 1=1 "
if request("typeid")<>"" thenend if
strsql=strsql+" order by flag desc"
That's it.
The REPLACE in asp means: [count] replace; DOS External Commands: Supersede or Update Files!
"msgbox ""The account is already in use"""
You can't use single quotation marks, but double quotation marks. >>>More
dim rs,sql,filename,fs,myfile,objspreadsheet,x
set fs = "") >>>More
select * from users where useraccount=" + "'" + username + "'" + "and userpwd=" + "'" + strmd5 + "'" >>>More
The common way to calculate the number of cards is: A 4 points, K 3 points, Q 2 points, J 1 points, the sum of 40 points, the general opening of the hand of the hand is not less than 16 points, the greater the number of points, the better, now you can understand why +4, +3, +1.