I am working on a search web page for my site. The requirements state that users can enter text for any combination of 9+ fields and the search should do an 'AND' match when querying the database. I could fairly quickly write this as a stored procedure using 'ISNULL' but I'm trying to figure out how to accomplish the same thing in LINQ...
Hi All,
I have the need to take the results of a query per line item and build a semi-colon delimited list of materials that make up that item.
Schema Makeup:
Tables:
LineItems (Unique Item Listing)
LineItems_Materials (Many to Many)
Materials (Unique Material Listing)
Line Items:
ID|LineItem
1|'1A.1'
LineItems_Materials:
ID|LineIt...
------------------------
| | A | |
------------------------
| | B | |
------------------------
| | C | |
------------------------ -----Page 1
| | D | |
------------------------
| | E | |
------------------------
| | F | |
------------------------ --...
I am trying to update one of my SQL tables with new columns in my source CSV file. These CSV records in this file are already in my SQL table, but they are lacking some of the columns from this CSV file.
I already added the new columns to my SQL table. But now I just need to import the data from the new columns. How can I do this b...
i have a varchar reporttime that has the date stored. dont ask me why it is a varchar
i am doing this to get data between two dates:
select rowid
from batchinfo
where CONVERT(DATE, reporttime, 103) between '2010-07-01' and '2010-07-31'
and it is not working
what am i doing wrong?
btw this is what the data looks like:
rowid da...
Been looking for this on Google for a while, but still looking. Couldn't turn up anything on it.
Using PHP to query MS SQL Server via ODBC. Code is below: (I've watered it down to bare-bones as I've tried to debug this)
$SQL=<<<HEREDOC
DECLARE @weekStart SMALLDATETIME;
SET @weekStart = DATEADD(d,0, DATEDIFF(d,0,GETDATE()));
S...
I need some help figuring out why the following scenario does not work. I'm trying to retrieve a value from the last updated ID in mysql, then pass that value via javascript over to an ajax call which calls a .php page, which also calls another function "ZEND_emaiL" in a different php page.
In the very first php page that retrieves the...
How do I select all rows except for ones that where I get an error calling CONVERT on one of the columns?
For example, I am doing this:
SELECT rowid
FROM batchinfo
WHERE CONVERT(DATE, reporttime, 101) between '2010-07-01' and '2010-07-31';
And I am getting errors for some of the values. I have two questions:
How can I skip the r...
I have created a Windows Search string custom property that shows up fine as a column in Windows Explorer. In C# I issue the following SQL query:
SELECT System.ItemPathDisplay, System.ItemName, My.Custom.Property FROM SystemIndex WHERE CONTAINS(My.CustomProperty, 'blah')
The resulting OleDbDataReader correctly returns a list of the fi...
Some product serial numbers are of type varchar and have a letter indicating the type followed by a number. The numbers are 0 padded up to 5 digits and we are approaching 'A100000'.
For the letters that have less than 100000 items they still want 0 padding up to 5 digits, and the letters that have more that 100000 to have more digits u...
I believe I my understanding is correct that there is a standard SQL. I'm assuming that MySQL, SQLite, and PostgreSQL all have variable support for the standard. Can anyone point me to a comprehensive comparison table that shows the differences?
...
I want to join two tables (below) which i get. But then I want to do a count to see how many times each job_category is shown when contactId > 0
Any Help would be appreciated!
Tablel :
| JobPositionId | JobPositionName | JobDescriptionId | JobCategoryId | ContactId
----------------------------------------------------------------------...
I have an excel spreadsheet with products and categories with a many to many relationship and i need to populate the db with it. I am searching for a quick way to enter this data in and have the join table have all the correct info. I have phpmyadmin but it seems to be a bit slow unless there is a shortcut. Another approach i was thinkin...
I am looking for a Python client for MSSQL, but one that supports encrypted connections to a remote MSSQL server.
Can someone recommend a technique for using Python to read from MSSQL, over an encrypted connection?
...
(row number not stored in db)
------------------------
| | A | | (1)
------------------------
| | B | | (2)
------------------------
| | C | | (3)
------------------------ -----Page 1
| | D | | (4)
------------------------
| | E | | (5)
------------------------
|...
How can I get a List all the JobPositionNames having the lowest jobPositionId when ContactId = 1
Tablel :
| JobPositionId | JobPositionName | JobDescriptionId | JobCategoryId | ContactId
---------------------------------------------------------------------------------
1 | Audio Cables | 1 | 1 ...
Hello,
I have a table (PAT_PROCEDURES) with three columns: patient_id, procedure_id, procedure_date, and token_id that stores records about patients and procedures they've undergone as well as the procedure's date; token ID is a special numeric identifier.
I also have another table (PAT_TOKENS) with three columns patient_id and token_...
I'm trying to find the most efficient way of dealing with this but I must tell you front-head I've made a mess of it. Looked around SO and found nothing of relevance so here it goes.
How to select all projects that have similar tags to the desired project?
Take this table for example:
(sql code to recreate tables bellow)
project 1 -...
I am building my wife a Contacts Manager program as a fun exercise in learning Silverlight 4. It will track peoples Addresses, Phone Numbers, Emails, Special Occasions(Birthday, Anniversary, etc)
Along the way I hit a minor road bump while designing the Database. She would like to be able to group Contacts(people) by Family so I creat...
Hello,
How to get Next Record value in SSRS 2005?
In SSRS 2005 has previous function but it has not NEXT function.
Any other way to implement this function?
Prompt reply will be appreciated.
Thanks,
Dhruval Shah
...