new user sql question

This is a discussion on new user sql question within the sqlserver-faq forums in Microsoft SQL Server category; dear all i have that call xyz that has data taken from a field machine this table has data structure like this ================================================== ==================== = QUEUE (type nvarchar) === TIME ( type nvarchar) == DATA ( type nvarchar) ==== ================================================== ==================== = x1 ==== 2008-03-07 12:17:50.274 == 23.0034 == = x1 ==== 2008-03-07 16:17:50.274 == 28.0034 == i need to create a query that will ask me to select the variable ( which is x1 ) the the intervale of data and time ( for ex. from 2008-03-07 to 2008-03-07 for day and time of houre is between hour 12:00 to 20:00 and ...

Go Back   Database Forum > Microsoft SQL Server > sqlserver-faq

Database Forums

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-26-2008, 11:31 AM
Default new user sql question

dear all
i have that call xyz that has data taken from a field machine
this table has data structure like this
================================================== ====================
= QUEUE (type nvarchar) === TIME ( type nvarchar) == DATA ( type
nvarchar) ====
================================================== ====================
= x1 ==== 2008-03-07 12:17:50.274 ==
23.0034 ==
= x1 ==== 2008-03-07 16:17:50.274 ==
28.0034 ==


i need to create a query that will ask me to select the variable ( which is
x1 ) the the intervale of data and time ( for ex. from 2008-03-07 to
2008-03-07 for day and time of houre is between hour 12:00 to 20:00 and give
the the value
how can i do this in sql knowing that are field are nvarchar type
your's
wael


Reply With Quote
  #2  
Old 08-27-2008, 02:29 PM
Default Re: new user sql question

Have you tried a BETWEEN clause in the WHERE clause?

--
__________________________________________________ ________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
__________________________________________________ __________________________________________



"wael elsayid aly" wrote in message
news:uhxl9A5BJHA.1628-at-TK2MSFTNGP02.phx.gbl...
> dear all
> i have that call xyz that has data taken from a field machine
> this table has data structure like this
> ================================================== ====================
> = QUEUE (type nvarchar) === TIME ( type nvarchar) == DATA ( type
> nvarchar) ====
> ================================================== ====================
> = x1 ==== 2008-03-07 12:17:50.274 ==
> 23.0034 ==
> = x1 ==== 2008-03-07 16:17:50.274 ==
> 28.0034 ==
>
>
> i need to create a query that will ask me to select the variable ( which
> is x1 ) the the intervale of data and time ( for ex. from 2008-03-07 to
> 2008-03-07 for day and time of houre is between hour 12:00 to 20:00 and
> give the the value
> how can i do this in sql knowing that are field are nvarchar type
> your's
> wael
>

Reply With Quote
Reply


Thread Tools
Display Modes



All times are GMT -4. The time now is 04:46 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Integrated by bbpixel2008 :: jvbPlugin R1013.368.1

Search Engine Friendly URLs by vBSEO 3.1.0
vB Ad Management by =RedTyger=
In an effort to better serve ads to our visitors, cookies are used on Mydatabasesupport.com. For more information, check out our Privacy Policy.