|
I have the following query, and wondering how to write in a cursor.
1) Select * From Master
2) Loop through every rows, check the column Company_ID.
3) If Company_ID = '1' Then
Update Master1 Set Status = 'A'
If Company_ID = '2' Then
Update Master2 Set...
Started by daniel50096230 on
, 4 posts
by 3 people.
Answer Snippets (Read the full thread at sqlteam):
In your case, these queries will solve your problem:
UPDATE a SET Status = 'A' FROM Master1.
|
|
On Fri, 20 Apr 2012 12:17:32 +0100, nixofortune <nixofortune@gmail.com
Hi guys,
I'm am experiencing strange behaviour with the replication.
Our replication Setup looks like this:
Master1(5.1.46-log)
=================Master...
Started by nixofortune on
, 10 posts
by 3 people.
Answer Snippets (Read the full thread at omgili):
It
appears you are trying to delete 8257 rows from the table`
This is an actual ROW....
Those are descriptions of the actual ROW events being executed.
,
This is a representation of the replication stream using ROW formatting.
|
|
Hi, I have a problem which I already solved using T-SQL(cursor & loop).(SQL server 2005)
But I am looking for the solution using SQL.
I have a Master Table with a column say MasterRecord(all are unique and type Varchar and PK)
MasterRecord
MRecord1
MRecord...
Started by priyanka.sarkar on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
As ( Select ROW_NUMBER() OVER(PARTITION BY MRecord ORDER BY MR_DETAIL_COLUMN) as TopCnt MR_DETAIL_COLUMN TABLE( MasterRecordID VARCHAR(20) ) INSERT INTO @Master (MasterRecordID) VALUES ('MASTER1') INSERT) VALUES ('MASTER1','MASTERDETAIL....
|
Ask your Facebook Friends
|
On Mon, 17 Aug 2009 16:54:01 -0700, joemomma <joemomma@discussions.microsoft.com
I have a question about the formula. I just set up sheet 2 to match th
ings entered in sheet 1 but my formula is =Sheet1!A2 not =Sheet2!A2
>
Started by joemomma on
, 3 posts
by 2 people.
Answer Snippets (Read the full thread at omgili):
Sheet
1 is the main sheet....
Inserting the formula per the instuctions works fine.
=INDEX(Sheet1!$A:$A,ROW())
=INDEX(Sheet1!$B:$B,ROW sheets sheet 1 (master1),
sheet 2 (fill1).
I'll strip his 'pointers' away.
LOOK again.
|
|
On Sun, 16 Aug 2009 09:23:01 -0700, KnightBall <KnightBall@discussions.microsoft.com
On Worksheet 1 named Transfer settings I have a table called
"transfer_settings". Column A is "Transfer Name" and Column B is "Item #"
I would like Worksheet...
Started by KnightBall on
, 4 posts
by 3 people.
Answer Snippets (Read the full thread at omgili):
Inserting I insert a row in
sheet 1 the ....
Sheet1!$A:$A,ROW())
=INDEX(Sheet1!$B:$B,ROW())
=INDEX(Sheet1!$1:$65536,ROW(),COLUMN())
Now my bad! been practicing on 2 little sheets sheet 1 (master1),
sheet 2 (fill1).
|