Is it possible to access an access database inside a query to a SQL server? (using C# and Queries)
Tag : chash , By : Thomas Plunkett
Date : March 29 2020, 07:55 AM
should help you out The syntax you have posted is for Access. For SQL Server, take a look at OPENROWSET.
|
Access dynamic query - Better to build one conditional SQL query or multiple queries with VBA?
Tag : sql , By : Christopher
Date : March 29 2020, 07:55 AM
seems to work fine I don't believe you would find one way is more efficient over the other, at least not noticeably. For the most part it is simply personal preference. I generally use VBA and check the value of each dropdown/checkbox and build pieces of the SQL query then put together at the end. The issue that you may run into with this method though is that if you have a large number of dropdowns and checkboxes the code is easy to get "lost" in.
|
Query for TFS Stored/Saved query by Full path and Query Name (Queries not in 'My Queries' or 'Shared Queries')
Tag : chash , By : Janne Laine
Date : March 29 2020, 07:55 AM
wish help you to fix your issue This self-recursive method will find your query from the query tree if it exists: static QueryDefinition GetQueryDefinitionFromPath(QueryFolder folder, string path)
{
return folder.Select<QueryItem, QueryDefinition>(item =>
{
return item.Path == path ?
item as QueryDefinition : item is QueryFolder ?
GetQueryDefinitionFromPath(item as QueryFolder, path) : null;
})
.FirstOrDefault(item => item != null);
}
var myquery = GetQueryDefinitionFromPath( (QueryFolder)workItemStore.Projects["MyProj"].QueryHierarchy, "Shared Queries/blah/blah2/MyTeamFolder/MyTeams WorkItems - All Workitems" );
|
Joining different queries into 1 query in MS Access
Date : March 29 2020, 07:55 AM
wish help you to fix your issue You can use UNION query for combining results of Query 1 and 2, column [Lost] in query 1 = 0, column [Won] in query 2 = 0 and then aggregate this query, using Sum on [Lost] and [Won]. Something like this: INSERT INTO Master (Player, Won, Lost)
SELECT Player, Sum(Won), Sum(Lost) FROM (
SELECT First([Master Data Results 2013 - 2016].[Winner]) AS Player,
Count([Master Data Results 2013 - 2016].[Winner]) AS Won,
0 AS Lost
FROM [Master Data Results 2013 - 2016]
GROUP BY [Master Data Results 2013 - 2016].[Winner]
HAVING (((Count([Master Data Results 2013 - 2016].[Winner])) > 1))
UNION
SELECT First([Master Data Results 2013 - 2016].[Loser]) AS Player,
0 as Won,
Count([Master Data Results 2013 - 2016].[Loser]) AS Lost
FROM [Master Data Results 2013 - 2016]
GROUP BY [Master Data Results 2013 - 2016].[Loser]
HAVING (((Count([Master Data Results 2013 - 2016].[Loser])) > 1))
)
GROUP BY Player
|
Microsoft Access Query - Merging two queries into one
Date : March 29 2020, 07:55 AM
it helps some times The given SQL will not run because of spaces in table and column names. This example eliminates those spaces. SELECT
Table1.Column3 , Table2.Column3
,Table1.Column4 , Table2.Column4
,Table1.Column5 , Table2.Column5
,Table1.Column7 , Table2.Column7
,Table1.Column8 , Table2.Column8
From Table1
Left Join Table2
On
( Table1.Column3 = Table2.Column3
AND Table1.Column4 = Table2.Column4
AND Table1.Column5 = Table2.Column5
AND ( Table1.Column7 = Table2.Column7
OR Table1.Column8 = Table2.Column8
)
)
|