Author |
Topic |
snufse
Constraint Violating Yak Guru
469 Posts |
Posted - 2011-08-26 : 13:49:06
|
Wonder how I will be able to select on date and time when date and time are stored in 2 seperate fields.I need to extract changed records from a table using DateChanged field and Timechanged field. I will be passing a datetime parameter as "changed since".Can I somehow use the where clause for this? |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
snufse
Constraint Violating Yak Guru
469 Posts |
Posted - 2011-08-26 : 15:36:31
|
Yes I can separate date and time from my parameter, but when I check on records that are to be included I need check both date an time as a group. I cannot check date by itself and time by itself. Since time belongs to date I need to combine somehow or? |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
snufse
Constraint Violating Yak Guru
469 Posts |
Posted - 2011-08-29 : 13:13:57
|
I am able to test on separate date and time fields using this:where concat(shupmj,shtday) >= ''''' + @JdeTimeStamp + ''''' Thank you guys. |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-08-29 : 13:18:48
|
whats concat? is it udf?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
snufse
Constraint Violating Yak Guru
469 Posts |
Posted - 2011-08-29 : 14:46:51
|
"Concat" is concatenation and this is an AS400 (iSeries) syntax for db2/400With the Concatenation Operator The concatenation operator (CONCAT or ||) combines two strings. The result of the expression is a string. Is there a better alternative than using "concat"? |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
snufse
Constraint Violating Yak Guru
469 Posts |
Posted - 2011-08-29 : 17:00:04
|
I am running my query from sql server 2005 box using linked server, rest of the code in the stored procedure is not related to db2/400.SQL for db2/400 can handle 90% of std sql clauses except for a few. |
 |
|
|