Sitemap

Amicuk Programming Answers

Using WHERE command in property loader SQL query

2015-10-11   Views:1

Advertisement

Hello All, Hopefully this will be a fairly straight forward question. I am attempting to use Property Loader to read in test limits from a SQL database. There are many types of models that need to be tested, each having a unique set of limits. I want

Hello All,
Hopefully this will be a fairly straight forward question.
I am attempting to use Property Loader to read in test limits from a SQL database. There are many types of models that need to be tested, each having a unique set of limits. I want to be able to retrieve the appropriate limits for the model of product under test.
To do this I have the product model number available in a FileGlobal. The database contains a table with the test limit information with an identifying 'ModelNumber_Number' column.
I have written the following SQL query achieve this:
"SELECT *  FROM TESTLIMITS WHERE ModelNumber_Number=+ FileGlobals.ModelNumber"
However, this is where I am confused. I'm not sure on the syntax for accessing a variable in the SQL command. I receive the following error:
The multi-part identifier "FileGlobals.ModelNumber" could not be bound.
Can someone please provide guidence on how to do this?
Many thanks,
Cam.
Solved!
Go to Solution.

The replay answer
Advertisement
Thank you very much for your reply.
Upon changing the query to as you suggest, I am presented with the following:
Error In SQL Statement Expression. "SELECT *  FROM TESTLIMITS WHERE ModelNumber_Number = " + FileGlobals.ModelNumber
Specified value does not have the expected type.
The type of FileGlobals.ModelNumber is a numeric represented as a double precision 64 bit signed integer.
The database column is also of type int 64.
Can you suggest a solution?
Many thanks.

Go to See the other 4 answers

Using WHERE command in property loader SQL query

Category:DefaultRelease time:2015-10-11Views:130

Hello All, Hopefully this will be a fairly straight forward question. I am attempting to use Property Loader to read in test limits from a SQL database. There are many types of models that need to be tested, each having a unique set of limits. I want[More]

How to use property file - sql query define in property file

Category:DefaultRelease time:2015-10-11Views:130

Hi All, Anybody please tell me how to use property file. I have placed sql query in propery file and I have to access this in my file. well so far this is my code but don't know how to implement in the following ... pstmt = con.prepareStatement("sele[More]

Loading SQL query File

Category:DefaultRelease time:-0001-11-30Views:130

Hi, I created all of my tables and constraints into a notepad document, and then when I was finished I named it proj4.sql so it could be loaded into oracle and automatically create my tables and constraints all at once. The problem is, I forgot the c[More]

Using Forumlas in (Command) SQL Query

Category:DefaultRelease time:-0001-11-30Views:130

We're trying to optimize the record returns on some reports and recently discovered the ability to apply a Command to specify the SQL Query. One of the things we do with our reports is actually pass in some values so the user doesn't have to enter so[More]

How to modify a SQL query?

Category:DefaultRelease time:2015-10-11Views:130

Hi all, I am using Crystal Reports version 10. I have a number of reports that have been written by a software vendor wherby the name of the database they were connected to when the report was written is coded into the FROM command of the reports SQL[More]

SQL Query report region that only queries on first load

Category:DefaultRelease time:2015-10-11Views:130

Hello all, Is there any way in which you can prevent a SQL Query report region from quering data after every refresh? I would like to make a report that queries on the first load, but then I would like to change the individual values, and reload to s[More]

Command the execute sql query and does not clean up data in Table

Category:DefaultRelease time:2015-10-11Views:130

Hi Team I have an SP, which writes source and target data to Temp Tables and runs except query to get mismatch details I am using Exec command to execute source query that writes data to Temp Table, once I execute query using Exec, data is written an[More]

SQL Dev 2.1:Ability to save and load visual query models?

Category:DefaultRelease time:-0001-11-30Views:130

At SQL Dev 2.1, do we now have the ability to save and load visual query models as with TOAD? Or has that functionality been rolled into the for-pay Data Modeler extension? Seemed strange to hide the functionality deep within SQL Worksheet, then not[More]

How do i get a output in CSV of a SQL query executed via SQL Command prompt

Category:DefaultRelease time:-0001-11-30Views:130

Hi All, I have a question with reference to SQL command prompt. I have a sql query which runs properly and gives proper execution in SQL Management console in GUI. This report is used to pull the free disk space report of our servers As i want to sch[More]

Handling property name with spaces in SQL query

Category:DefaultRelease time:-0001-11-30Views:130

Hello, I have some JSON that looks like this:     "SystemId": "112234",     "Parameter": {         "Total Hours": [                 "timestamp": "2015-03-15T15:20:00Z",                 "item[More]

Error in SQl Query - SQl Command not properly ended

Category:DefaultRelease time:-0001-11-30Views:130

Hi All I have this SQL query that returns the following error when I run it in TOAD: SELECT VC.CAMPAIGN_NUMBER,VC.CAMPAIGN_TITLE,VC.CAMPAIGN_DESC, VCV.START_DATE, VCV.END_DATE,VC.CAMPAIGN_TYPE,VC.APPLICABILITY, VC.CAMPAIGN_PRIORITY      FROM      VM_[More]

Hot
Hi Folks, after some help Recently tried setting up a triple display set up on Mac pro with ATI Radeon HD 5770 from the single display previously used. I have 2 new Samsung B1930 monitors connected through Mini Display Port to VGA apple connectors in [More]
How can i navigate to a webpage in project sienaHello, You can use Launch("http://www.bing.com") This will load the webpage in the default system browser. In the current release there is no control in Siena to load a page within Siena itself Reg [More]
I've got my work exchange e-mail set-up on my phone to have a quiet time before 8am, after 6pm and al;l day at the weekend when sync is set to "Manual". This works fine 99% of the time -except if my phone has been switched off.  When the phone i [More]
Can anyone suggest a simple technique for creating fixed length files? CSV and delimited files are pretty simple using CFFILE. Is there an elegant way to create fixed length files?Simplest: Use LJustify() or RJustify() on your lines of data. EG: <cfs [More]
Hi, all I was trying to create a small script to send a notification if the Caps Lock is active or not. The script works correctly in the terminal, but when I use the script as a shortcut in KDE it does not work ... I simply trigger the shortcut with [More]
I can split out multiple archive databases just like I split out multiple primary databases on Exch 2013, correct? Thank you.Hi, Do you mean you want to split one archive database into multiple archive databases? If so, you can move some archive mail [More]
Ive downloaded a TV programme on itunes and when I click to view it I get an error message "itunes has stopped working" and it shuts down Please helpLet's try the following user tip with that one: iTunes for Windows 10.7.0.21: "iTunes has s [More]
I am thinking of buying a mac mini. All I want it to do is share my Itunes. I have a macbook pro with an ssd and have 100 gigs left out of 768 gigs. my Imac is 7yrs old and runs every day. How would I set it up? and is it worth it. I want one place w [More]
Hi Guys, I have the following volumes on my MacPro 1. Boot Disk - 465.3 GB, 200GB used 2. Raid 0 volume - 436.2 GB How easy is it for me to move the boot disk data to the raid 0 volume and then boot from the raid 0 partition. Also I have heard that i [More]
Lately when I've used a mask (in Photoshop CS6), it leaves a slight imprint of the orginal image that I'm trying to "erase." My opacity is at 100%, I am not using blending modes or effects at all. Any idea why this is happening? Thanks.The light [More]