on 2011 Jun 01 4:32 PM
When using UNION I receive "Cannot convert '' to a timestamp" when I try to run something like this:
select [field1], [field2] from [table]
union
select [field1], '' from [second table];
Field1 is the same in both tables. In the first select statement field2 data type is timestamp but I don't want field2 pulled from the second select statement. Is there a way to cast or format field2 in the second statement to run in this instance?
Appreciate any assistance.
Try NULL instead of ''.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
68 | |
10 | |
10 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.