Connecting Tech Pros Worldwide Help | Site Map
 
 
LinkBack Thread Tools Search this Thread
  #1  
Old November 12th, 2005, 09:03 AM
Robert Stearns
Guest
 
Posts: n/a
Default TIMESTAMPs and WHERE

Can I use wildcards with a TIMESTAMP attribute? If not, what is the
resulting format when I CAST it as VARCHAR? Now that I think about it, I
need the same questions answered for DATEs too.

  #2  
Old November 12th, 2005, 09:04 AM
Serge Rielau
Guest
 
Posts: n/a
Default Re: TIMESTAMPs and WHERE

Robert Stearns wrote:
[color=blue]
> Can I use wildcards with a TIMESTAMP attribute? If not, what is the
> resulting format when I CAST it as VARCHAR? Now that I think about it, I
> need the same questions answered for DATEs too.
>[/color]
Can you give an example? It's unclear what you mean to me.

Cheers
Serge
  #3  
Old November 12th, 2005, 09:04 AM
Robert Stearns
Guest
 
Posts: n/a
Default Re: TIMESTAMPs and WHERE

Serge Rielau wrote:[color=blue]
> Robert Stearns wrote:
>[color=green]
>> Can I use wildcards with a TIMESTAMP attribute? If not, what is the
>> resulting format when I CAST it as VARCHAR? Now that I think about it,
>> I need the same questions answered for DATEs too.
>>[/color]
> Can you give an example? It's unclear what you mean to me.
>
> Cheers
> Serge[/color]
Sure: everything in March of this year: like 2004-03%
every thing that ran on the first of any month: like ____-__-01%
anything done after 7PM before 7AM: like ____-__-__-19% or like
____-__-__-20% ... (Wouldn't a full regular expression accepting like be
nice?)

  #4  
Old November 12th, 2005, 09:04 AM
Serge Rielau
Guest
 
Posts: n/a
Default Re: TIMESTAMPs and WHERE

Robert,

CHAR(tstamp, ISO) LIKE '......' should do it.

Cheers
Serge
  #5  
Old November 12th, 2005, 09:04 AM
Ian
Guest
 
Posts: n/a
Default Re: TIMESTAMPs and WHERE

Robert Stearns wrote:
[color=blue]
> Serge Rielau wrote:
>[color=green]
>> Robert Stearns wrote:
>>[color=darkred]
>>> Can I use wildcards with a TIMESTAMP attribute? If not, what is the
>>> resulting format when I CAST it as VARCHAR? Now that I think about
>>> it, I need the same questions answered for DATEs too.
>>>[/color]
>> Can you give an example? It's unclear what you mean to me.
>>
>> Cheers
>> Serge[/color]
>
> Sure: everything in March of this year: like 2004-03%[/color]

You can't do where year(ts) = 2004 and month(ts) = 3?


Have you seen the YEAR, MONTH, DAY, HOUR ... functions that operate
on timestamps, dates and/or times?



-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 205,248 network members.