We're are going to be using transactional replication for
bi-directional data flow between our ERP at one physical location and our e-commerce store at a secondary physical location. There is a tunnel between the two locations to support secured data flow.
We're having much heated debate...
If I needed to include a where clause, would it be added as such;
INSERT INTO [LinkedServerName].[DataBaseName].[schema].[TableName] (field list here)
SELECT (field list here) FROM TableName
WHERE field = 'criteria here'
SQL Server 2005 Standard
I need to copy specific records from server 1, table A into
server 2, table A.
(2) physical servers with there own instance. The tables are identical between the servers. I need to copy records from one into the other to recover lost data.
I've been playing with...
I wrote the following query wanting the results to be one row with a sum for column1 and column2 as the fields. However,
I'm getting 20 records results with a sum by the field ledgertrans.accountnum.
Appreciate some assistance with getting the desired result.
Thank you,
Andrew...
SQL 2005
I'm trying to eliminate a division by zero issue.
Can someone assist with proper syntax for a statement like;
if sum(Field 1)[denominator] = 0
then 0
else sum(field 2)[numerator]/sum(field 1) [denominator]
Fields 1 and 2 also need to be summed.
I keep getting an invalid expression...
SQL 2005
Table A (Item Master) Table B (Item Location)
There is 1 record for every item in the item master TABLE A.
There are 3 records for every item in the item location table, TABLE B.
I want to join the (2) tables and have the results be just 1 record per item where the quantities in...
SQL 2005
we have a situation where we have a master sales header table that holds all sales records, however, we have (2) sales line tables, with unlike data structures that hold the aggregate of the sales lines that are associated with the headers.
table A = sales header (3 records, 2 from B...
Not sure the best practice for accomplishing this requirement in a select query;
I want to query FIELD 1 in Table A
if FIELD 1 = ABC then
query another field for it's value
if FIELD 2 = XYZ then 2
else - 2
else 0
the result of this query...
The data will eventually be imported into an accounting application that requires that the import file be an Excel file format.
So the query results will have to be broken into 3 separate Excel files due to the limitation of rows in an Excel file.
I don't know how to programtically isolate the...
I have a query set result of 135,000 records that I need to get into Excel. Excel is limited to about 65,000 rows.
I'm aware of the TOP function where I could select the TOP 65,000, leaving me with the remaining or bottom 70,000 records in the query results to get into a second Excel file...
I'm having a problem with the syntax.
I have written the following;
select b.field1,
case when b.field1 > 0 then b.field1
else null as b.field2
end
case when b.field1 =< 0 then b.field1
else null as b.field3
end
from MyTable
I get the following error message;
Msg 156, Level 15...
I want to query a column from a table, evaluate the value in that column (column 1). If the value in column 1 is > 0, input that value into column 2, if the value in column A is < 0, input that value from column 1 into column 3.
ex: column 1 column 2 column 3
-5...
I want to create a global distribution list that will include both, corporate email accounts from our GAL, and also, a few
external email accounts.
ex: A distribution list with both corporate staff and staff from a consulting firm that we are working on a project with.
Appreciate your...
I want to link my inventory master to my sales history to display sales by item (sku). The issue is, I want to return all items from the inventory master, even if they have no sales. (Not have a corresponding record in the sales history table).
Once I link the two tables, all items without...
Thanks for the reply.
I need a little hand holding with the parameter and formula. Do I need to create a single parameter {GroupParam} that incorporated all 3 fields, or 3 individual parameters that the formula will call? {GroupParam}? If a single, how do I do that?
Thanks again,
Andrew
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.