Smart questions
Smart answers
Smart people
Join Tek-Tips Forums

Member Login

Remember Me
Forgot Password?
Join Us!

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.
Jobs from Indeed

Link To This Forum!

Partner Button
Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

chinnaseenu (IS/IT--Management) (OP)
16 Aug 05 13:44

I've SQL Server Column 'DueDate' that is a string data type but it stores a date value
as 'yyyymmdd'(eg:20050816) i want to convert it into integer ,when i use SQLServer function
cast_integer([DueDate])  i'm getting the error that the function does not exist.

please any kind of help would be great i'm stuck with that for couple of days.

THANX alot
KingCrab (MIS)
16 Aug 05 14:41
select cast('20050816' as datetime)
KingCrab (MIS)
16 Aug 05 14:49
sorry hit submit a bit quick :P

cast_timestamp('20050816') will give you a real date
cast_integer('20050816') will give you an integer

What I was saying above is that cognos actually does a
convert(int,'20050816') in the SQL itself
not a cast..This should work. I would look at the generated SQL and see if you can figure out what it is actually doing.

chinnaseenu (IS/IT--Management) (OP)
16 Aug 05 15:16
Hai thanx for the reply,
but it's working if i give explivitly like'20050816'
and it's not working if i send a column from sqlserver data base
i'm getting that the function does not exist.

QE-DEF-0177 An error occurred while performing operation 'sqlPrepareWithOptions' status='-228'.

UDA-SQL-0219 The function "cast_integer" is not available as an external, database, or built-in function.

KingCrab (MIS)
17 Aug 05 7:36
Where are you adding this? If you are adding it to an actual SQL statement (tab sql or something) then you must use the proper sql. Cast_integer is not a command that work natively with sql server. You need to use convert
chinnaseenu (IS/IT--Management) (OP)
17 Aug 05 9:17
i really thank you for your patience and helping me.

actually i'm getting that column [DUEDATE] from SQLServer into a tabular model
there i dragged 'Dataitem' and in the expression of that i wrote "cast_integer([DueDate])".

How should i use convert in reportnet does it work for any database? could you please give me the syntax?

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Back To Forum

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close