Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn
Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    [SOLVED] DMC - mapping Datefield with SQL GetDate
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] DMC - mapping Datefield with SQL GetDate
 Login/Join
 
Member
posted
Hi,

I want to pass sql expression into my query.

Moving data from source to Destination. Want to pass EditDate as Getdate(). Which will be date from sql server. Is there any way to make it recognize GetDate. I tried adding transform and and seeing SELECt query, its saying its invalid.

Please let me know if its possible

Thank
D

This message has been edited. Last edited by: Chuck Wolff,


WebFOCUS 8
Windows, All Outputs
 
Posts: 15 | Registered: July 15, 2016Reply With QuoteReport This Post
Guru
posted Hide Post
The SQL Server function GETDATE() actually returns the current date and time to the millisecond.

You can get the current timestamp with the function
CURRENT_TIMESTAMP(3) 

However the milliseconds are zeroed out.

So if you need that precision or for some other reason need to use GETDATE() assuming the source table(s) are in MS SQL Server you can invoke a Transact SQL function or expression like this:
DB_EXPR(GETDATE())  
 
Posts: 333 | Location: New York City | Registered: May 03, 2007Reply With QuoteReport This Post
Member
posted Hide Post
Hi Thank you for reply. I tried DB_EXPR(GETDAET()) at multiple places its not recognizing the syntax.

Where should this be valid to do. In Select object, Target Object mapping or source Object mapping. Its not taking it. If you have done so incase can you please share screenshot?

Thanks
D


WebFOCUS 8
Windows, All Outputs
 
Posts: 15 | Registered: July 15, 2016Reply With QuoteReport This Post
Guru
posted Hide Post
In the SQL object under SQL Expression works. BTW there's a typo in your post. Make sure you spell the function name correctly.
 
Posts: 333 | Location: New York City | Registered: May 03, 2007Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    [SOLVED] DMC - mapping Datefield with SQL GetDate

Copyright © 1996-2017 Information Builders, leaders in enterprise business intelligence.