Click here to Skip to main content
15,914,500 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
"SELECT * FROM [SlideShowTable]ORDER BY rnd (INT(NOW*ImageID)-NOW*ImageID)where startdate <= system.date.now AND enddate >=system.date.now", con);
Posted

No,

SQL
SELECT * FROM [SlideShowTable]
where startdate <= system.date.now AND enddate >=system.date.now
ORDER BY rnd (INT(NOW*ImageID)-NOW*ImageID)


the select Query syntax is look like this

SQL
SELECT COLUMNS
FROM   TABLENAME
WHERE  CONDITIONS
GROUP BY FIELDS
HAVING CLAUSE
ORDER BY COL ASC/DESC


If you want more information regarding this please refer this link..
http://beginner-sql-tutorial.com/sql-select-statement.htm[^]
 
Share this answer
 
Comments
Amirsalgar1 11-Apr-13 4:52am    
thanx a lot sir ...
Amirsalgar1 11-Apr-13 4:53am    
but now the error is showing is
No value given for one or more required parameters.
Naveen.Sanagasetti 11-Apr-13 5:09am    
check your parameteres are refer in proper name or not.
Amirsalgar1 11-Apr-13 5:14am    
yup is it ..and i kept data type as a memo
Naveen.Sanagasetti 11-Apr-13 5:24am    
check this line ORDER BY rnd (INT(NOW*ImageID)-NOW*ImageID)
is it correct , first of all you can execute this query in your SQL side in sql wise its working fine then you can use that in your code
Hi,

Refer below link

SELECT (Transact-SQL)[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900