I'm trying to run a query on Rally using an Excel plugin based on iteration. I have established that the plug-in works by running a query for blocked stories. However, I get the following error when attempting to query by iteration:
Query failed due to errors:
Cannot parse object reference from "iterationname"
Matt Greer answered a very similar question in March, but I can't figure out how to translate this answer into making my query run. Please help. Thanks in advance
The query chooser in the Excel add-in is fairly primitive and really only works for fields that aren't objects themselves (ScheduleState, PlanEstimate, etc.)
Since you are querying a sub-object you can just type in the query manually in the textfield and save it.
(Iteration.Name = "Foo")
Related
I'm trying to document some legacy Excel documents for source control ahead of their decommissioning. I need to extract all SQL queries contained within them.
I've been searching for various ways of doing this for a while in either VBA or PowerShell (other options welcomed) and when I thought I had this in place, I realised I'd just returned the source query i.e.
Dim mt AS ModelTable
Dim wb AS Workbook
Set wb = Workbooks.Open(myFilePath)
'Get Model Tables and create a file per SQL query
For Each mt In wb.Model.ModelTables
sql = mt.SourceWorkbookConnection.OLEDBConnection.CommandText
Debug.Print sql
Next
When I run the above, I have anywhere between 2 and 10 model tables per Excel file but am only able to return the SQL from the source query that created the connection.
I've tried several variations on the Model object but either get blank, a reference to model, or the same result i.e. just a single query.
For context, the 'EC' connection is our SQL database which is feeding the model tables.
In the UI I see the below:
UI Queries and Connections
EC Details
Most articles, or posts on here refer to adding or updating the queries, whereas I just need to extract them!
Not sure if I'm wording the question appropriately, or what I need to achieve isn't possible.
Any help massively appreciated as constantly going in circles here!
UPDATE
I found a few guides online to do this slightly differently, and to query the model within the workbook via MDX; I've since found that the compatibility of the model is set to 1103 so am unable to use the TMSCHEMA_* DMVs.
Having spent several hours searching yesterday on ways to get the source query/partition query/table query I repeatedly hit dead-ends, am I trying to do the impossible here?
I am currently working on a NodeJS project handling datas with MongoDB via microsoft AzureCosmosDB.
For the good use of the project, I have a shared collection (with the _id as shardkey) that I would like to empty regularly, I know that this is done using the "deleteMany" instruction with an empty object as parameter.
So I tried and I am currently facing a recurrent error :
query in command must target a single shard key
I understand the logic behind this error, but I don't know where to start to find a solution, and didn't find any help in the mongo documentation.
I've read about using hashed shardkeys and how this make the use of shardkeys more "flexible", but I would like to know if there is an easyer solution, maybe something i've missed that would allow me to empty the collection without giving all the item ids one by one :)
Any idea ?
Thank you very much !
SO
It appears that this is not currently possible, and that the Azure CosmosDb team is working on it, with a tentative of release date in the firsts months of this year (2019).
https://feedback.azure.com/forums/263030-azure-cosmos-db/suggestions/34813063-cosmosdb-mongo-api-delete-many-with-partition-ke
Thank you for the help and sorry for bothering
You should be able to make a query or delete command by matching any document in the collection that has _id field:
db.collection.deleteMany({ _id: { $exists: true }})
When I try to run a report in COGNOS Report Studio, I get error : ORA-00918: column ambiguously defined
Now there is no way to get the runtime sql and test it out against the oracle db. So I am left groping around.
My question is...when we develop the model in framework manager, we do not write our own sql. Just specify the tables and columns and joins. So the error should never come because this error come when you forget to prefix a column name with the table alias.
I agree it is odd. Start removing data items from the query until it works. Try to narrow it down to a specific data item within a table. See what SQL is generated without the offending field, that should give you a hint as to what is going on.
I have an Access table with a date/time field. I wanted to make a composite Key field out of the date/time field and 3 other text fields in the same format as the matching Key field in another database.
So I concatenated the 3 text fields and wrote a User-Defined-Function in a Module to output the date field as a string in the format "YYYYMMDD".
Public Function YYYYMMDD(dteDate As Date) As String
YYYYMMDD = Format(dteDate, "YYYYMMDD")
End Function
I can then successfully run my queries in Access and it all works fine.
But when I set up some DAO code in Excel and try to run the query that works fine within Access...
db.Execute "qryMake_tblValsDailyAccount"
...Excel gives me the "Undefined function in expression. (Error 3085)" error.
To me this is a bug in Excel and/or Access, because the (Excel) client shouldn't need to know anything about the internal calculations that normally take place perfectly in the (Access) server when in isolation.
Excel should send the querydef (name with no parameters) to the server, let the server do its work then receive the answers. Why does it need to get involved with a function internal to the server?
Does anyone know a way around this?
Access uses Jet, and the combination of Access and Jet understands VBA functions. DAO is a generic data access layer that doesn't understand VBA functions.
When you use DAO, you're not automating Access, merely using that bridge to get to the data.
Even though some versions of Access use DAO internally to communicate with Jet, the ability to understand VBA is programmed into Access, not DAO.
I think your workaround is the best you can do.
Ok, I've hacked a fix to it by replacing the VBA function with a query that joins to the original data table through its primary key ValsDaily_ID
SELECT tblValsDaily.ValsDaily_ID,
Format(Year(tblValsDaily.BusinessDate))+
Format(Month(tblValsDaily.BusinessDate),"00")+
Format(Day(tblValsDaily.BusinessDate),"00") AS YYYYMMDD
FROM tblValsDaily;
but this is really lame, and I still don't know why the VBA version doesn't work...
I've got a Subsonic query that isn't returning any values. I think the problem is in my where clause, although I'm not sure why.
What I'm really looking for is a way to debug the query to see the SQL that's actually being spit out by Subsonic. I know there was a way to do this with the Query object with Inspect(), but I'm using Select objects (or could also probably use SQLQuerys) because I need joins. Is there any inspect() type option for a Subsonic Select?
Here's the code I'm using:
Dim qry As New [Select]("Contract_NO")
qry.From(<table1>.Schema)
qry.InnerJoin(<table2>.<table2columnA>, <table1>.<table1columnA)
qry.Where(NonInfoleaseLessor.Columns.LessorCode).Like("mystring")
If I comment out the where line, I get a full list of results. It doesn't like something about it, but I've manually run the query at the database with that where clause, and it works. How can I see what the difference is?
The problem with your query is that you should be using Contains("mystring") instead of Like("mystring").
The best way to see the SQL is to use the BuildSqlStatement() method of the query.
Use [a] profiler to see what SQL is actually being executed against the database.
As Adam spotted:
.Like("mystring")
should most probably be
.Like("%mystring%")
please try using Like("%mystring%")
It might have something to do with your choice of clause, or which column name you are using. Subsonic has a couple of column name field
OBJECT.xyzColumn
OBJECT.xyzColumn.QualifiedName
OBJECT.Columns.xyz
I have had to play with these in the past to get the values I wanted.