A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How to Analyze Attributes in a Query



 
 
Thread Tools Display Modes
  #1  
Old May 7th, 2010, 03:04 PM posted to microsoft.public.access.queries
SHKNBKE
external usenet poster
 
Posts: 2
Default How to Analyze Attributes in a Query

Is there a function/formula that you can use in a query against a field to
return what type of attribute the field value is?

If so, can you then change that attribute just in the query output?

Thanks.

SHKNBKE

  #2  
Old May 7th, 2010, 04:24 PM posted to microsoft.public.access.queries
Jerry Whittle
external usenet poster
 
Posts: 4,732
Default How to Analyze Attributes in a Query

What do you meand by attribute? Are you talking about the data in the field?
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"SHKNBKE" wrote:

Is there a function/formula that you can use in a query against a field to
return what type of attribute the field value is?

If so, can you then change that attribute just in the query output?

Thanks.

SHKNBKE

.

  #3  
Old May 7th, 2010, 04:41 PM posted to microsoft.public.access.queries
SHKNBKE
external usenet poster
 
Posts: 2
Default How to Analyze Attributes in a Query

Jerry Whittle wrote:
What do you meand by attribute? Are you talking about the data in the field?
Is there a function/formula that you can use in a query against a field to
return what type of attribute the field value is?

[quoted text clipped - 6 lines]

.

Actually I belive it would be the data type.
Thanks.

  #4  
Old May 7th, 2010, 07:29 PM posted to microsoft.public.access.queries
PieterLinden via AccessMonster.com
external usenet poster
 
Posts: 307
Default How to Analyze Attributes in a Query

SHKNBKE wrote:
Is there a function/formula that you can use in a query against a field to
return what type of attribute the field value is?

If so, can you then change that attribute just in the query output?

Thanks.

SHKNBKE


You can try casting it... it might work (depends on the types you're trying
to cast from/to). There's a function for each destination type

CStr[ing] e.g. CStr(1) = "1"
CInt[eger] CInt("1") = 1
etc...

Is that what you were looking for?

--
Message posted via http://www.accessmonster.com

  #5  
Old May 7th, 2010, 08:12 PM posted to microsoft.public.access.queries
Jerry Whittle
external usenet poster
 
Posts: 4,732
Default How to Analyze Attributes in a Query

You can use the TypeName function.

Select FieldName, TypeName([FieldName])
From YourTable ;

As far as changing the data type in a query, you can use things like the
CDate and Val functions to change text to dates and numbers respectively.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"SHKNBKE" wrote:

Jerry Whittle wrote:
What do you meand by attribute? Are you talking about the data in the field?
Is there a function/formula that you can use in a query against a field to
return what type of attribute the field value is?

[quoted text clipped - 6 lines]

.

Actually I belive it would be the data type.
Thanks.

.

 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:07 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.