Questions tagged [linq]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
2answers
34 views

How to group by linq based on input parameter?

I want to use group by in C#, and my result must be like this code in SQL: SELECT MAX(EffectiveDate) AS EffectiveDate,details.PersonnelBaseID FROM dbo.tkp_PersonnelDetails AS details where details....
0
votes
0answers
37 views

How to join multiple tables

I'm Stuck at Joining multiple tables. Context: i have order table which is linked to productTable(name: ORDER_DETAILS) and recipeTable(ORDER_RECIPEs).I can order product from product menu and ...
0
votes
1answer
66 views

Can't get data from stored procedure [closed]

After working on my database a bit, I am working on a VB.Net app that accesses it using LINQ. I have the following stored procedure in the database: CREATE PROCEDURE dbo.GetTableColumn( @ColName ...
0
votes
1answer
237 views

Advice needed regarding design of database schema keeping record of current stock

Disclaimer: I am a beginner in the field of database. I am trying to design a database in PostgreSQL which will record the sales and purchases of items. I intend to use this database as the model ...
3
votes
1answer
84 views

Is there a need to index the short string code for a faster query?

We have a large number of tables for setup forms. In each form, there is a need to fill in the Code and the Description. The Code consists of a varchar(10) datatype. Now, the thing is, every time a ...
-1
votes
1answer
341 views

Splitting rows into columns with group by clause

I have three tables Lab, Payments and Transaction I want to spilt transType into two columns, sum TransType Group By BillId and compare it with Lab.TotalBill to get Refundable Payments/Due payments I ...
0
votes
1answer
57 views

Check for existing matches to find the field their grouped-by

So I have a table of values associated with different sessions using a field called sessionid, lets say the table has 3 other fields: itemcode, itemcost, & itemeffect. What I end up doing, is ...
1
vote
1answer
1k views

Deleting duplicate rows with condition [duplicate]

I have posted a similar question before, but this one is a little modified. I have a table with 4 columns as shown below. ITEMCHARGE CPT4 EFF_DATE CPT4MOD 326.8 29075 ...
1
vote
2answers
1k views

Deleting duplicate rows with condition(Using SQL and LINQ)

I have a table with 5 columnsID,CPT4,CPT4Mod,ItemCharge,Eff_Date. Deletion Condition: When rows exists with duplicate CPT4and CPT4Mod field values but different ItemCharge and Eff_Date values, ...
5
votes
2answers
7k views

Should I refresh query plan cache

Please let me explain my problem and situation: I have a web application - MVC3, MSSQL Server 2005, LinqToSQL. It has been running great until one fine morning I pushed a lot of rows to a table that ...
11
votes
2answers
167 views

A question on SARGability

I just need to confirm that I understand something correctly: I recently viewed an SO question in which a user posted an answer in Linq like: from p in db.table where p.column.AddMinutes(1) > ...
4
votes
1answer
1k views

Why does DataContext.SubmitChanges() Exist?

I'm not sure if this goes here or on Stack Overflow, but I figure someone here might know it. Why did the developers of LINQ decide that not only do you need ctx.InsertOnSubmit(item); but you also ...