ATTENTION

This FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices.


flexsim.com

Go Back   FlexSim Community Forum > FlexSim Software > Tips and Tricks
Downloads

Tips and Tricks Share helpful modeling ideas

  #1  
Old 11-16-2015
Sebastian Hemmann's Avatar
Sebastian Hemmann Sebastian Hemmann is offline
Flexsim User
 
Join Date: Sep 2009
Location: Braunschweig (Germany)
Posts: 439
Downloads: 52
Uploads: 0
Thanks: 472
Thanked 217 Times in 154 Posts
Rep Power: 319
Sebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to behold
Default SQL issues

Hi,

just am very new to SQL in FlexSim and facing a Problem I can´t find a solution. Maybe anybody has a hint for me. What I´m trying to do looks this way:

Quote:
int i_val = 0;
int i_Auftragsnr = getlabel(token,"Auftrag");

query("SELECT * FROM ProdListe \
WHERE Art_Nr = i_Auftragsnr ");

i_val = getqueryvalue(1,4);
return i_val;
__________________
Hemmi
  #2  
Old 11-16-2015
Jason Lightfoot Jason Lightfoot is offline
Flexsim Consultant
 
Join Date: Aug 2007
Location: Somerset, UK
Posts: 719
Downloads: 20
Uploads: 0
Thanks: 123
Thanked 953 Times in 446 Posts
Rep Power: 773
Jason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond repute
Default

You should be able to just concat() the integer onto the end using numtostring()

so

query(concat("SELECT * FROM ProdListe \
WHERE Art_Nr =",numtostring(i_Auftragsnr,0,0)));

Last edited by Jason Lightfoot; 11-16-2015 at 04:06 PM.
The Following User Says Thank You to Jason Lightfoot For This Useful Post:
Sebastian Hemmann (11-16-2015)

Tags
sql


Thread Thread Starter Forum Replies Last Post
Cursor issues David Chan Q&A 0 08-07-2015 08:33 PM
Dashboard issues Sebastian Hemmann Tips and Tricks 6 12-19-2013 03:12 AM
Transport issues FlorianK Q&A 3 05-24-2011 10:36 AM
GUI Button Issues shashanktrivedi Q&A 5 05-23-2011 10:34 PM
PLC connection, positioning issues Stephan Seidel Q&A 13 04-08-2010 01:02 AM


All times are GMT -6.
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.