Synthesis AG - SyncML Discussion Forum  

Go Back   Synthesis AG - SyncML Discussion Forum > Synthesis SyncML Products (english) > SyncML Servers (Linux, Windows, MacOS X)

Reply
 
Thread Tools Display Modes
  #1  
Old 2007-01-30, 21:43
ajpurkiss ajpurkiss is offline
Junior Member
 
Join Date: 2007-01
Posts: 17
Default MApping complex select statment

I have been given a db to map calendar items from however they don't have a simple start and end date I can use to get DTSTART and DTEND so what I am doing instead to generate a start and end time is running some complex MySQL Date functions to generate these values and then using the AS statement to make a user friendly feild name.

The problem I have is that the field mapping I uase ignores this and the two feilds are marked <unassigned> in my logs

Basically I need to know how to map my SQL
SELECT %N,
DATE_ADD(DATE_ADD(m.date_start, INTERVAL MINUTE(m.time_start) minute), INTERVAL HOUR(m.time_start) hour) AS date_start,
DATE_ADD(DATE_ADD(DATE_ADD(DATE_ADD(m.date_start, INTERVAL MINUTE(m.time_start) minute), INTERVAL HOUR(m.time_start) hour), INTERVAL m.duration_hours hour), INTERVAL m.duration_minutes minute) AS date_end
FROM meetings m, meetings_users u WHERE m.id='%k' AND u.meeting_id='%k' AND u.user_id='%u'

so that the field mapping picks it up and the date_start and date_end infomation gets passed from the server to the syncing device.
Reply With Quote
  #2  
Old 2007-02-01, 00:21
ajpurkiss ajpurkiss is offline
Junior Member
 
Join Date: 2007-01
Posts: 17
Default Re: MApping complex select statment

The solution to this was to put it in the field mapping instead of a db field name.
Reply With Quote
Reply

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

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


All times are GMT +2. The time now is 08:29.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.