I have these tables: http://stackoverflow.com/questions/2104063/my-final-mysql-db-could-someone-check-if-the-tables-are-correctly-made
How can I make an Insertion of an ad here?
Is join used on insert also?
Thanks
Clarification: I need to insert values into multiple tables here, and don't know how to do it else than using multiple IN...
In order to remove the bias introduced by the differences in the number of days in the months and years (in case of leap years), from monthly total comparisons of arbitrary quantities and assuming, for example, a table named My_Table with a datetime column named order_date, and an integer one named revenue, I use the following query to g...
Folks, is there a tool to format/indent SQL Server queries in query window ?
TIA
...
I'm working on my first project using LINQ (in mvc), so there is probably something very simple that I missed. However, a day of searching and experimenting has not turned up anything that works, hence the post.
I'm trying to write a LINQ query (Linq to SQL) that will contain a multiple number of conditions in the where statement separa...
I've been under the impression that quoting integers in SQL queries is frowned upon, but I've recently learned that prominent frameworks like Django adheres to this practice. Is it in fact perfectly acceptable?
...
Hey Guys,
I need to format a string and pass it in as parameter for a SQL IN clause such as:
Select * from Table Where X In (@param1)
The literal string that is passed in as a param looks like this:
"Item1, Item2, Item3"
This does not seem to work. Any suggestions? Thanks!
...
Hi, I have made my parameter as a hyperlink.
Now i want to click the hyperlink and then list of all information of that value in hyperlink.
How do i do that?
From Account No | To Acc No | Amount | Date
So, from account no is value exist from db, and a hyperlink. so i wanna click from accno e.g (123456), and then it will list all tran...
I am creating a new DB and was wondering if there was any downside to adding numerous indexes to tables that I think may require one.
If I create an index but end up not utilizing it will it cause any issues?
...
I am looking to improve the performance of a query which selects several columns from a table. was wondering if limiting the number of columns would have any effect on performance of the query.
...
I'm trying to figure out the best way to move/merge a couple tables of worth of data from multiple databases into one.
I have a schema similar to the following:
CREATE TABLE Products(
ProductID int IDENTITY(1,1) NOT NULL,
Name varchar(250) NOT NULL,
Description varchar(1000) NOT NULL,
ImageID int NULL
)
CREATE TABLE ...
I have this db below. I wonder how I should use the ID to identify each record.
Everything is connected from the classified_table!
Two Questions:
Should I use AI on every PK in this case?
Could somebody give me the FULL code for selecting an entire classified from only an ad_id ("bmw_330ci_8939483" for example)?
I am new to normalize...
In sql reporting services, I have a parameter on a report that is query based called InstitutionID. I have specified the Value field as InstitutionID and the Label field as InstitutionName based on a dataset. By using the reporting services API or by querying the ReportServer database directly I need to know which fields were used as t...
In the process industry, lots of data is read, often at a high frequency, from several different data sources, such as NIR instruments as well as common instruments for pH, temperature, and pressure measurements. This data is often stored in a process historian, usually for a long time.
Due to this, process historians have different req...
I have a query like the following:
SELECT * FROM OPENROWSET('MSDASQL', 'Driver={Microsoft Excel Driver (*.xls)};DBQ=D:\test.xls','SELECT * FROM Sheet1$]')
This brings back rows that are all null if they were ever edited and then deleted. I want to exclude those, but still include rows that have good data but possible null cells.
My ...
The output that comes from a custom view of mine is as follows...
Col1 Col2 Col3 Col4
xxxx Cake 1 1*
Cake xxxx 2* 1
xxxx Cake 2 0*
xxxx Cake 0 0*
Cake xxxx 2* 0
Cake xxxx 2* 0
and what i would like to sum is...
For every row,
if the word Cake is found in Col1, t...
Objective:
we want to write a DLL using VB.NET 2008 using .Net 3.5 that performs an HTTP request
we then want to call the DLL From SQL Server 2005 (in a trigger) and pass the DLL some variables and get a return value.
Where im at in the process.
I have created the DLL 'HTTPDLL.dll'
Source:
Imports System
Imports System.Configurati...
Will it be possible to insert into two tables with same insert command?
...
Hello
I have a Database with the following two tables, USERS, POSTS
I am looking for a way to get the count of how many posts a user has.
Users Posts
+----+------+ +----+---------+-----------+
| ID | Name | | ID | user_id | Name |
+----+------+ +----+---------+-----------+
| 1 | Bob | | 1 | 1 | B...
Hi everyone.
I have a Powershell script that calls sqlcmd to run a sql script that backs up a database:
function RunSqlScriptWithErrorMessage
{
param([string]$sqlServer, [string]$sqlUserName, [string]$sqlPassword, [string]$scriptName, [string]$errorMessage)
$commandName = "sqlcmd"
$startInfo = New-Object Diagnostics.Proces...
Hello,
I have a table which looks like this:
ID Date Size Marked
1 2010-02-02 2 X
2 2002-02-02 1
1 2010-02-03 2 X
2 2010-02-03 3
3 2010-02-03 4 X
And I have a code (PHP) which does following things:
a) Calculate sum of sizes per day
b) Find the difference between tot...