|
View previous topic :: View next topic |
Author |
Message |
RRing
Joined: 16 Aug 2006 Posts: 39
|
Posted: Thu Feb 25, 2010 11:25 am Post subject: SQL Query Action Syntax Error |
|
|
I am trying to substring the insert of the reply field as per below and keep getting an error. I know the ODBC insert replaces the quotes in some manner, but cannot get the below query to work. Can ypou please let me know what I am doing wrong?
Insert into UserCapacity (Eventtime,Folder,Reply) Values (Getdate(),'%Folder%','Substring(%Reply%,CharIndex('Participants=',%Reply%)+13,Charindex('|Conferences=',%Reply%)-charindex('Participants=',%Reply%)-13)')
When Using the following query
Insert into HMCapacity (Eventtime,Folder,Reply) Values (Getdate(),'%Folder%','%Reply%')
Here are results
ACK|Command=ConfCount|MessageNumber=0|Participants=0|Conferences=0|Returned=Success|\r\n\r\n
Last edited by RRing on Thu Feb 25, 2010 11:30 am; edited 1 time in total |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12811 Location: USA
|
Posted: Thu Feb 25, 2010 11:29 am Post subject: |
|
|
You should use quotation marks for %Reply% variable
Regards
Alex |
|
Back to top |
|
|
RRing
Joined: 16 Aug 2006 Posts: 39
|
Posted: Thu Feb 25, 2010 11:41 am Post subject: SQL Query Action Syntax Error |
|
|
Thanks Alex- I missed that. Looks like I had that wrong, and also had to remove the quotes around the complete substring command. All works good now. Thanks you for your quick reply. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|