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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Output help

Status
Not open for further replies.

MeanJoeGreen13

IS-IT--Management
Jan 6, 2008
15
My current query:
Code:
mySQL1="SELECT * FROM demo where tasks<>'' and cast(left(ptime,4) as unsigned) = " & xryear & " and status <=> " & xrstatus & " and subid <=> '" & xruser & "' and cast(substr(ptime,6,2) as unsigned)=" & xrmonth

table called demo

ptime column set as TEXT
data inserted to this column with DATE_ADD(LOCALTIME(),INTERVAL 420 minute)
und it's format looks like this: 2008-11-07 10:32:35

for that example:
xryear = 2007
xrstatus = 1
xruser = "232323232_pop.dr.tu"
xrmonth = 01

i need that the output will give me the numbers of day dates from the table demo by order asc

how can it be done with mysql syntax?
 
You'll want to post this in the MySQL forum not the Microsoft SQL Forum. The syntax is a bit different between the two.

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

My Blog
 
It is alawys best to store date data in a datetime datatype. Do not store it as text.

"NOTHING is more important in a database than integrity." ESquared
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top