Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Index creation question

3 posts in Delphi Last posting was on 2012-02-22 14:51:24.0Z
Sean C. Sang Sr Posted on 2012-02-22 13:29:01.0Z
From: "Sean C. Sang Sr" <sangsoft@hotmail.com>
Newsgroups: Advantage.Delphi
Subject: Index creation question
Date: Wed, 22 Feb 2012 07:29:01 -0600
Lines: 1
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_NextPart_000_0008_01CCF133.A5C2B990"
X-Priority: 3
X-MSMail-Priority: Normal
Importance: Normal
X-Newsreader: Microsoft Windows Live Mail 15.4.3538.513
X-MimeOLE: Produced By Microsoft MimeOLE V15.4.3538.513
NNTP-Posting-Host: 173.57.59.27
Message-ID: <4f44ed50@solutions.advantagedatabase.com>
X-Trace: 22 Feb 2012 05:27:44 -0700, 173.57.59.27
Path: solutions.advantagedatabase.com
Xref: solutions.advantagedatabase.com Advantage.Delphi:25660
Article PK: 1109239

Hi,
how can I create an index key from a timestamp field that on contains the date portion of the timestamp?
I am using ADT tables on local server only.
 
Thanks in advance
Sean


Joachim Duerr (ADS) Posted on 2012-02-22 14:12:51.0Z
From: "Joachim Duerr (ADS)" <jojo.duerr@gmx.de>
Subject: Re: Index creation question
Newsgroups: Advantage.Delphi
References: <4f44ed50@solutions.advantagedatabase.com>
Date: Wed, 22 Feb 2012 15:12:51 +0100
User-Agent: XanaNews/1.19.1.269
X-Face: u2p+</,mb|Ah!x!/qxX5q0t:O~.<1&JzwNHYhSqcviY{~&|iDc"U.Je1A.ZeHR`d;;y#R
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 10.29.66.103
Message-ID: <4f44f73f$1@solutions.advantagedatabase.com>
X-Trace: 22 Feb 2012 06:10:07 -0700, 10.29.66.103
Lines: 12
Path: solutions.advantagedatabase.com
Xref: solutions.advantagedatabase.com Advantage.Delphi:25661
Article PK: 1109241


Sean C. Sang Sr wrote:

>how can I create an index key from a timestamp field that on contains
>the date portion of the timestamp? I am using ADT tables on local
>server only.

you can create an index with the expression TSTOD(TimeStampField).

--
Joachim Duerr, Advantage Presales
*** NEW *** Advantage Pocket Guide released *** NEW ***
http://pocketguide.jd-engineering.de


Sean C. Sang Sr Posted on 2012-02-22 14:51:24.0Z
From: "Sean C. Sang Sr" <sangsoft@hotmail.com>
Newsgroups: Advantage.Delphi
References: <4f44ed50@solutions.advantagedatabase.com> <4f44f73f$1@solutions.advantagedatabase.com>
In-Reply-To: <4f44f73f$1@solutions.advantagedatabase.com>
Subject: Re: Index creation question
Date: Wed, 22 Feb 2012 08:51:24 -0600
Lines: 1
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset="UTF-8"; reply-type=original
Content-Transfer-Encoding: 8bit
X-Priority: 3
X-MSMail-Priority: Normal
Importance: Normal
X-Newsreader: Microsoft Windows Live Mail 15.4.3538.513
X-MimeOLE: Produced By Microsoft MimeOLE V15.4.3538.513
NNTP-Posting-Host: 173.57.59.27
Message-ID: <4f45009f$1@solutions.advantagedatabase.com>
X-Trace: 22 Feb 2012 06:50:07 -0700, 173.57.59.27
Path: solutions.advantagedatabase.com
Xref: solutions.advantagedatabase.com Advantage.Delphi:25662
Article PK: 1109240

I tried that and I still don't get the expected behavior. Let me clarify,
the index is made up of t fields for the table in this format:
fldStartTime;fldID1;fldID2. fldStartTime is define as a timestamp field, ID1
and ID2 are integer fields. I have the index set to unique. I then add a few
records that, I though, should violate the unique key, but it doesn't. the
return value of the TSTOD function says it’s a dDate, what 'type' is that?


"Joachim Duerr (ADS)" wrote in message
news:4f44f73f$1@solutions.advantagedatabase.com...

Sean C. Sang Sr wrote:

>how can I create an index key from a timestamp field that on contains
>the date portion of the timestamp? I am using ADT tables on local
>server only.

you can create an index with the expression TSTOD(TimeStampField).

--
Joachim Duerr, Advantage Presales
*** NEW *** Advantage Pocket Guide released *** NEW ***
http://pocketguide.jd-engineering.de