That actually works as well.
Now my issue is why do I need to set the size? Isn't variable character supposed to be just that, variable? (OK, read some more and see that length needs to be declared to to let Oracle know how much space to allocate to hold the return value.)
I can just put 100 or 1000, but I'm assuming that's poor programming and may eat resources. I'm trying to write generic methods to call, so I can't...
User Profile
Collapse
-
Thanks pfvhl. I did add that, but also had to change the type in .NET to Char, and set a length greater than what was needed. Not sure why Varchar wouldn't work.Leave a comment:
-
C#.NET stored procedure call
Trying to follow examples I've seen online to call a simple stored procedure. Converting from (working) data readers to stored procs to get SQL code out of .NET project. Error is on execute ("ORA-00900: invalid SQL statement"). I've used other SQL examples and get the same problem. Not sure if it's in my parameter adding.
...Code:public string DGetEmailAddress(string emplid) { string -
-
Nested query
I have the following two queries setup and working just fine. However, I know this is not the best way to write them, as this should be just one query, but I do not know how to nest these.
The idea is to find the serial numbers where the most recent assignment (max AssignmentDate) has a value in the ReturnDate field (that is, according to our data, the unit should be returned and hasn't been reassigned).
Query 1:... -
-
Cancel OnClose event when switching to design view
I have an OnClose function that opens a switchboard (SwitchOpen). This function is placed in numerous objects' (reports and forms) OnClose event, and works great. However, a very annoying occurrence happens: when I have an object open, then click Design View, the OnClose event triggers, causing the switchboard to open event though the object isn't truly "closed". What event should I place the SwitchOpen under so that it only fires when... -
-
Compact database setting
I've been using the compact database on closing option in my databases. Recently, instead of compacting the current file, on close a new database (sequentially numbered db1, etc.) is created instead. I do not know of any setting change that would have caused this. It does this on multiple databases in different folders. I think they all started doing this at the same time. Any ideas? -
NeoPa,
My question would be how do I update the original data? I posted a while ago about trying to edit data in a Union Query (learned the sad result of "you can't").
As an example of the start of this thread, most of the tables have a field "TailNumber ". However, one table may have "Tail Number", another "Tail #", and another "TNumber". In the Union they are obviously...Leave a comment:
-
I got an idea at home last night and wanted to post my solution:
[code=vb]
Sub FindTNField()
Dim rs As DAO.Recordset
Dim db As DAO.Database
Dim fld As DAO.Field
Dim I As Integer
Set db = CurrentDb()
Set rs = db.OpenRecordse t(gSource)
For I = 0 To rs.Fields.Count - 1
Set fld = rs.Fields(I)
rs.FindFirst "[" & fld.Name & "] LIKE '" & gBadTN &...Leave a comment:
-
Somehow, the Order By had the RQ...Vendor in it. I have no idea how that ended up like that, but thanks for the heads up! It didn't even register in my brain that the two "Vendor" fields were different.Leave a comment:
-
Search tables and retrieve field name
Ok, I hope I can explain this one well enough!
I have tables that contain similar data but are not all uniform; I use queries to create uniform data sets (same field names, formatting, etc.). I have a process that needs to update records in the original table. However, I cannot simply refer to a field name to update, as it can vary amongst the tables. My idea is to take a piece of data (in my example, an aircraft tail number, assigned... -
[code=sql]SELECT M_Locations.Tra iningCenterID, [Master Fuel History].FuelID, [Master Fuel History].QuoteDate, [Master Fuel History].FuelType, [Master Fuel History].VendorID, [Master Fuel History].Vendor, [Master Fuel History].Price, [Master Fuel History].AvGasDiscount, [Master Fuel History].AvGasMarkup, [Master Fuel History].AirportID, [Master Fuel History].[Airport Name]
FROM [Master Fuel History] INNER JOIN M_Locations ON [Master Fuel History].AirportID...Leave a comment:
-
I tried that, and no luck. I've dealt with this error before as well in queries, but the error is only occuring when I run the report, not when I run the actual query.Leave a comment:
-
Aggregate function error opening a report
Getting the following error opening a report, cannot figure out the cause:
"You tried to execute a query that does not include the specified expression 'RQ_FuelQuoteRe portHistory.Ven dor' as part of an aggregate function"
Not sure why this comes up as Vendor is not part of any aggregate function (that I know of!). The query runs fine. The error occurs when opening the report. Vendor is not used in sorting or grouping.... -
I didn't really think about it, but I can just export the data to Excel. It isn't for something very formal, so I don't need to make a fancy report.Leave a comment:
-
Account ledger running balance in a report
I have a standard Transactions table with debits and credit. I need a report that shows a running balance after each transaction. In Excel, this would be something like the following (B: Debits, C: Credits, D: Balance) D5=D4-B5+C5. I've seen how to do sums in reports, but not sure how to incorporate adding and subtracting at the row level. Thanks. -
missinglinq,
Is there any workaround other than just do individual queries rather than a union?Leave a comment:
-
Updateable query?
The point of this query is to look at the transactions already entered and see if new transactions have occured and if there is a need to update the amount of the transaction.
I have an update query that is running into the error: Operation must use an updateable query.
[code=sql]UPDATE M_Transactions INNER JOIN Q_UMI ON (Q_UMI.TransDat e = M_Transactions. TransactionDate ) AND (M_Transactions .VendorID = Q_UMI.VendorID) SET...
No activity results to display
Show More
Leave a comment: