473,385 Members | 1,890 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Help on the following SQL server Select query

SELECT *
FROM jake19812ce655..FIREFOX_Memory
WHERE Date >= 2008-08-27 04:33:00
AND Date <= 2008-08-27 04:34:23


hi ..when running the above given query I am getting an error message that says
Msg 102, Level 15, State 1, Line 4
Incorrect syntax near ':'.

I dont understand what's wrong as the date column in FIREFOX has valid
rows with date/time values in them
Aug 28 '08 #1
2 1166
ck9663
2,878 Expert 2GB
SELECT *
FROM jake19812ce655..FIREFOX_Memory
WHERE Date >= 2008-08-27 04:33:00
AND Date <= 2008-08-27 04:34:23


hi ..when running the above given query I am getting an error message that says
Msg 102, Level 15, State 1, Line 4
Incorrect syntax near ':'.

I dont understand what's wrong as the date column in FIREFOX has valid
rows with date/time values in them
Expand|Select|Wrap|Line Numbers
  1. WHERE Date >= cast('2008-08-27 04:33:00' as datetime)
That is if your Date column is of datetime data type

--- CK
Aug 28 '08 #2
Expand|Select|Wrap|Line Numbers
  1.  
  2. select startdate from fortest;
  3. --startdate is a datetime type
  4. --the following are startdate's records in  table fortest
  5. startdate
  6. 2008-08-08 12:12:12.000
  7. 2008-08-21 21:21:21.000
  8. 2006-07-07 00:00:00.000
  9. 2009-09-09 00:00:00.000
  10. 2008-08-08 12:12:12.000
  11.  
  12. select startdate from fortest where startdate <'2009-09-09 10:00:00.000' and startdate>'2006-07-07 00:00:00.000'
  13. --now result
  14. startdate
  15. 2008-08-08 12:12:12.000
  16. 2008-08-21 21:21:21.000
  17. 2009-09-09 00:00:00.000
  18. 2008-08-08 12:12:12.000
Aug 29 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Surendra | last post by:
I have this query that I need to use in an Update statement to populate a field in the table by the value of Sq ---------------------------------------------------------------------------- Inline...
0
by: Mike Chirico | last post by:
Hopefully this will help someone... Helpful Things to Know about MySQL Mike Chirico (mchirico@users.sourceforge.net) Last Updated: Fri Apr 16 11:47:34 EDT 2004 The latest version of this...
28
by: stu_gots | last post by:
I have been losing sleep over this puzzle, and I'm convinced my train of thought is heading in the wrong direction. It is difficult to explain my circumstances, so I will present an identical...
0
by: jaggee | last post by:
Hello, This is regarding log analysis of a web system, I am finding my backend SQL programming has taken so much of time to process the application due to following quires for a log table having...
2
by: Amanda | last post by:
From a guy in Microsoft newsgroups: | In *comp.databases.ibm-db2* there are always IBM guys | from the Toronto labs on line.Post with the | -for the love of god please help- | line...
1
by: RSH | last post by:
Im trying to create a stored procedure of the following code. I want to set it so that I have to send the first 4 variables (@DB, @BackUpFile,@TestDB,@RestoreFile). I am having trouble when i try...
4
by: Will Chamberlain | last post by:
I am working on queries for a SQL database. I have much experience with Access and am trying to ween myself off of it. The query I am working on now is supposed to return a set of data like the...
0
by: gunimpi | last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431 ******************************************************** VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help wanted...
47
by: Jo | last post by:
Hi there, I'm Jo and it's the first time I've posted here. I'm in process of creating a database at work and have come a little unstuck.....I'm a bit of a novice and wondered if anyone could...
0
by: RCapps | last post by:
When running the below SQL Query I keep getting the following error: Server: Msg 4924, Level 16, State 1, Line 1 ALTER TABLE DROP COLUMN failed because column 'ContractDef' does not exist in table...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.