|
What have you tried?
Where are you stuck?
What help do you need?
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
i want make for me ER diagram
|
|
|
|
|
Then you need to consider what is the best tool to help do whatever you want. No one here is going to do it for you.
|
|
|
|
|
Member 14635620 wrote: (as described in the Access 2000 manual
And have you read what was described in the Access 2000 manual?
|
|
|
|
|
Can you please do my homework for me based on a product manual that is 19 years old?
Who in Ghu's name is using the Access 2000 manual as a reference.
Presumably there is an teaching institution somewhere attempting to teach you.
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
Probably the same one that teaches VB6.
|
|
|
|
|
Sir i want to fetch data from a table where status in Debit and Credit.So i want amount saprate with debit and credit. and its diffrence.Please help me
|
|
|
|
|
There's no way anyone can help you based on that description.
You need to show us the structure of your table, the sample input, and the expected output.
You also need to show us what you've tried, and tell us where you're stuck.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
How can we help?
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
So I'm new to MongoDb; well I have about a year of experience, and I'm trying to write my first really complicated read.
What I'm trying to do, is grab a Brand by name, then all the products that match the brand name, then go through the products and get all the different distinct category names. Finally, grab the categories that match the list of category names.
So I'm just down to the final part, I have a list of distinct category names that are available by an enumerator, and I have a list of categories, I just can't figure out how to do the final part. I don't know what to call it either to search for help. I thought about a loop going through the categories, but I'm not sure how to unpack my distinct list of category names. Or perhaps the authors already thought of this and wrote something.
The categoryDistinct works.
categoriesSelected , my new list of categories
categories , a list of all the categories
var brandTask = _context.Brands.Find(b => b.Name == brandName).FirstOrDefaultAsync();
var productsFiltered = _context.Products.Find(b => b.Brand == brandName).ToList();
var categoriesDistinct = productsFiltered.GroupBy(c => c.Category).Select(x => x.FirstOrDefault());
var categoriesSelected = new List<Category>();
var categories = await context.Categories.Find( => true).ToListAsync();
var productFilter = Builders<Product>.Filter.Eq("Brand", brandName);
var productsTask = _context.Products.Find(productFilter).ToListAsync();
await Task.WhenAll(brandTask, productsTask);
return new GetBrandPage { Brand = brandTask.Result, Categories = categoriesSelected, Products = productsTask.Result };
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|
|
I came up with this and it works so far. A combination of Mongo and Linq.
Changed some categoryDistinct to productDistinct , better name.
I actually didn't think it would work.
var brandTask = _context.Brands.Find(b => b.Name == brandName).FirstOrDefaultAsync();
var productsFiltered = _context.Products.Find(b => b.Brand == brandName).ToList();
var productsDistinct = productsFiltered.GroupBy(c => c.Category).Select(x => x.FirstOrDefault());
var categoriesSelected = new List<Category>();
foreach (var product in productsDistinct)
{
var cx = _context.Categories.Find(c => c.Name == product.Category).First();
if (cx != null)
{
categoriesSelected.Add(cx);
}
}
var productFilter = Builders<Product>.Filter.Eq("Brand", brandName);
var productsTask = _context.Products.Find(productFilter).ToListAsync();
await Task.WhenAll(brandTask, productsTask);
return new GetBrandPage { Brand = brandTask.Result, Categories = categoriesSelected, Products = productsTask.Result };
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|
|
Hi,
Working in a time tracking program, I've thought of separating results in pages.
I think of making a specific SQL query to count the amount of total registers with the applied filters, then call the another SQL query with LIMIT clause to be able to define from which record I want to start showing the results and the amount of results.
Is there any better way to do it?
Thank you in advance!
|
|
|
|
|
|
I have a column and i need to find in which table this column exists throughout whole DB Using query
|
|
|
|
|
The column name is not unique. The column with a particular name may be in every DB table.
And BTW, what DBMS are talking about: MS Access, SQL Server, Oracle, PostgrSQL, ...?
|
|
|
|
|
Assuming Sql Server:
SELECT SCHEMA_NAME(schema_id) [Schema Name]
,t.name AS [Table Name]
FROM sys.tables AS t
JOIN sys.columns c ON t.OBJECT_ID = c.OBJECT_ID
WHERE c.name = 'ColumnName'
|
|
|
|
|
How do i browse to let's say 10 records before the last one? Code below:
Dim con As String =
"User=SYSDBA;PASSWORD=masterkey;Database=/DATABASE/TIME_DBS/TC_SHPIRAG3ST4.gdb;Datasource=192.168.2.78;Port=3050;Dialect=3"
Dim conexiune As FbConnection = New FbConnection(con)
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
conexiune.Open()
Try
Dim sCmd As FbCommand
Dim sql As String
Dim ds As FbDataReader
sql = "select * from RT_TIME ORDER BY RTTI_COUNTER desc"
sCmd = New FbCommand()
sCmd.Connection = conexiune
sCmd.CommandText = sql
ds = sCmd.ExecuteReader
ds.Read()
TextBox1.Text = ds("RTTI_BIT_POS")
Label1.Text = ds("RTTI_HOOK_POS")
ds.Close()
conexiune.Close()
Catch ex As FirebirdSql.Data.FirebirdClient.FbException
MsgBox(ex.ToString, vbCritical, "DB Error")
End Try
End Sub
modified 22-Sep-19 23:38pm.
|
|
|
|
|
|
thanks, i didn't find the right information
|
|
|
|
|
nevermind, found it: sql = "select FIRST 1 SKIP 10 * from RT_TIME ORDER BY RTTI_COUNTER desc "
|
|
|
|
|
Hi!
We are re-writing existing access DB process into Oracle.
With that said, we need to calculate averages upon request. The data is loaded everyday through datawarehouse. We would need to store amount value everyday, maybe into another table, and be able to calculate the average upon request? Just have a table listing the key fields in addition to date and amount? with date and amount changing everyday?
Is there any other option to do this? If it were SQL server, I could have explored the SSIS packages. Not sure in Oracle.
thank you!
|
|
|
|
|
You ask "your" users what sort of queries they "typically" deal with; and (re)design your data warehouse based on that.
This isn't something you base on opinions gathered in the wild.
The Master said, 'Am I indeed possessed of knowledge? I am not knowing. But if a mean person, who appears quite empty-like, ask anything of me, I set it forth from one end to the other, and exhaust it.'
― Confucian Analects
|
|
|
|
|
how to make number 56,500,51 in MySQL
I tried to make a function in MySQL like this
CREATE FUNCTION `fTITIK`(number double(8,2)) RETURNS VARCHAR(255) CHARSET latin1
DETERMINISTIC
BEGIN DECLARE hasil VARCHAR(255);
SET hasil = REPLACE(REPLACE(REPLACE(FORMAT(number, 2), '.', '|'), ',', '.'), '|', ','); RETURN (hasil);
END
hen when it starts it only appears 56,500 while the numbers that are behind the comma do not work
any suggestion?
what should I fix?
modified 17-Sep-19 23:58pm.
|
|
|
|
|
It looks like the value represents a floating point number (or currency.
If that's the case, don't store it as a string. The app that uses the data is responsible for correctly formatting the value for display purposes.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|