I'm trying to get all the assets where Class property equals to one of the values in selectedIClassesList;
Something like this:
from x in Assets where selectedIClassesList.Contains(x.Class) select x
Hi. I am working to implement a dataconnection between my C# application and an Sql Express database. Please bear in mind I have not worked with Sql queries before.
I have the following relevant tables:
ArticlesCommon
ArticlesLocalized
CategoryCommon
CategoryLocalized
where ArticlesCommon holds language independent information such as price,…
Hi,
I have 3 tables: projects, skills and project_skills. In projects table i hold project's general data. Second table skills i hold skill id and skill name also i have projects_skills table which is hold project's skill relationships. Here is scheme of tables:
CREATE TABLE IF NOT EXISTS `project_skills` (
`project_id` int(11) NOT NULL,
…
I have a table that I need to get some specific data from for a view. Here's the base table structure with some sample data:
| UserID | ReportsToUserID | Org ID |
-------------------------------------
| 1 | NULL | 1 |
-------------------------------------
| 2 | 1 | 1 |…
I am using the Location module within Drupal 6 to tag geographical locations to blog entries. So every blog entry has a long/lat
My question is: What is the most efficient way of querying all coordinates for all blog entries of a given user?
I am going to be crazy I think. Please Help.
I have a table which fields are Date, No, Turnover, TotalWin, Opencredit, Handpay, Billin, gamesplayed and I am trying to write sql in vb.net that will show me previous day value but I cant. Here is what I am trying to do.
SELECT Meter.*
FROM
Meter AS Previous,
…
I want to achieved the results shown in the attached image. The Table Structure and Data are the ffg below:
Table Relationship
Overall IB Limit->one to many-> Facility Limit
Facility Limit->one to many-> Facility Sub Limit
Tables Structure and Data
Overall IB Limit
Id SCAF Reference …
I have to show records in such a way that some selected records should come first. After this, another records come in sorted manner from the same table.
For example, If I select state having stateID = 5 then the corresponding record should come first. after this another records should come in sorted manner.…
So i need to figure out how i can get a record count value and use that count as a new value to insert into a table.
Ex: In My Stored Procedure
@Count int
What im looking for
@Count to equal "select top (1) _fieldName from _someTable order by _fieldName Desc"
Finally
insert into _newTable…
Hi,
We have nested folders with parent-child relationship. We use MySQL MyISAM DB.
The data is stored in the DB in the following manner.
Every time a child folder is created in the nested structure, the previous parentID is added. I want to get the RootFolderID of a folder which is added in the…
I have two tables set up similar to this (simplified for the quest):
actions-
id - user_id - action - time
users -
id - name
I want to output the latest action for each user. I have no idea how to go about it.
I'm not great with SQL, but from what I've looked up, it should look…
So I don't consider myself a novice at MySQL but this one has me stumped:
I have a message board and I want to pull a list of all the most recent posts grouped by the Thread ID.
Here's the table:
MB_Posts
-ID
-Thread_ID
-Created_On (timestamp)
-Creator_User (user_id)
-Subject…
I am trying to update a record in the target table based on the record coming in from source. For instance, if the incoming record is present in the target table I would update them in the target else I would simply insert. I have over one million records in my source while my…
SELECT *
FROM tbl_order_head AS o
INNER JOIN tbl_orders_log AS c
ON o.PAYMENT_TRANSACTION_LOG_ID=c.TRANSACTION_ID
WHERE o.VISUAL_ID = '77783';
tbl_order_head 67,000 (30 fields) records, tbl_orders_log 17000 (5 fields) records. I don't know if it would eventually return as I…
hey
guys i need to count new private messages and old one from a table
so first thing come to mind is using mysql_num_rows and easy thing to do
// check new pms
$user_id = $userinfo['user_id'];
$sql = "SELECT author_id FROM bb3privmsgs_to WHERE…
How do I automatically interrupting long queries in the mysql, if it possible?
I'm understand, that I need optimize queries instead of. But now I have access on database server only.
Hello Guys!
I've two MS SQL tables: Category, Question. Each Question is assigned to exactly one Category. One Category may have many subcategories.
Category
Id : bigint (PK)
Name : nvarchar(255)
AcceptQuestions : bit
IdParent : bigint (FK)
Question
…
Sorry for vague question title.
I've got a table containing huge list of, say, products, belonging to different categories. There's a foreign key column indicating which category that particular product belongs to. I.e. in "bananas" row category might be 3…
Hello,
i'm building a chart and i want to recieve data for each months
Here's my first request which is working :
SELECT s.GSP_nom AS nom, timestamp, AVG( v.vote + v.prix ) /2 AS avg
FROM votes_serveur AS v
INNER JOIN serveur AS s ON v.idServ =…
Hello Guys!
I've two MS SQL tables: Category, Question. Each Question is assigned to exactly one Category. One Category may have many subcategories.
Category
Id : bigint (PK)
Name : nvarchar(255)
AcceptQuestions : bit
IdParent : bigint (FK)
…
I saw couple of SO questions (SO) concerning SQL-server. For SQL-server there was no decent solution. All were hacks/workarounds. What about Oracle? Is it same answer (Paremeterizing each value)? Any Oracle example without LINQ would be…
I am getting error msg on the word Records - Type or namespace could not be found. Please help debugging it, what is missing?
if (ProjDDL1.SelectedItem.Value != "--") results = CustomSearch<Records>(results, s => s.Business…