| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
|
| 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 |
|
#2
|
| 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" 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 > |
![]() |
| Thread Tools | |
| Display Modes | |