|
|
|
The real learning comes from doing it yourself. No effort no gain. Have confidence in yourself. If you still encounter problems after trying, then come back to post your problems in the quick answer section.
|
|
|
|
|
I used this link,but I am having trouble.because some records is exception.
|
|
|
|
|
can I use SQl-CLR for this problem?
|
|
|
|
|
f,amiri882 wrote: the content of this field Containing different of information such as phone number,address and ...
f,amiri882 wrote: how do I grouping it In various fields? You shouldn't; the correct way would be to have a separate field for each of those attributes.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
what?I don't underestnad
|
|
|
|
|
Assuming your field values is comma separated and is of fixed number, check out this example at sql fiddle. It spilts the multiple-value field and insert them into a new table with separate fields. Adapt it to suit your need.
|
|
|
|
|
|
is there the C# code for this problem?
|
|
|
|
|
So, you don't want to understand your own problem and learn how to solve it and then you expect someone else to write code for you?
|
|
|
|
|
Hi All,
I am trying to debug a data issue, where in a query is reporting incorrect data.
Upon looking at the query having about 15 tables joined in the query, there is one join where it is specified as RIGHT OUTER JOIN but does not have a table it joins to. I am researching an existing query, written by someone else with no documentation.
I tried to add one join at a time to debug this issue, but the query fails when i try to add the RIGHT OUTER JOIN with no table to join on specified. I really don't know how the original query is working.
any ideas/inputs much appreciated!!
Thanks!
|
|
|
|
|
vkEE wrote: I really don't know how the original query is working. Neither do I, but if you post the query here we could have a look at it
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Hi,
Maybe that table was dropped or renamed?
|
|
|
|
|
I have a two MySQL databases, of which one is a Live(production) and the other is local database.
I want to synchronize specific table data from Live database to local database at regular time intervals(only specific tables and not the whole database).
Is it possible?? If yes, How can i implement??
Thanks in advance..
|
|
|
|
|
If MySQL has the concept of Jobs and you can hve a linked server then you write a stored proc that inserts new records from DB1 to DB2. Schedule that job to run as often as you require.
If MySQL supports replication you can also look into that as a much more robust operation, much more complex but it will have recovery options.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
|
Arun Sylvester J wrote: is a Live(production) and the other is local database.
Probably depends on exactly what that means.
Certainly in normal production systems there is no access at all to the database outside of the hosting center. And of course if you really have a "local" database on some random client machine then just allowing arbitrary duplication is normally going to be a security concern.
|
|
|
|
|
I have a two MySQL databases, of which one is a Live(production) and the other is local database.
I want to synchronize specific table data from Live database to local database at regular time intervals(only specific tables and not the whole database).
Is it possible?? If yes, How can i implement??
Thanks in advance..
|
|
|
|
|
Greetings to you,
Please assist me in combining these sql queries
I have some record in my database (sql ce 4.0), using;
1.
Select Customer_ID as Customer, Credit, Debit, Account_Balance as Balance, Transaction_Date as Date
from ThriftsTrans Where Transaction_Date Between '15/Dec/2013' And '18/Dec/2013'
Produces this result;
Customer Credit Debit Balance Date
---------------------------------------------------------------------
000001 12000 12000 2013-12-16T14:32:00.9770000
000001 5000 17000 2013-12-16T14:32:26.0070000
000001 2000 15000 2013-12-16T14:32:43.3870000
000001 2000 17000 2013-12-17T10:23:08.6470000
000002 50000 50000 2013-12-17T10:25:35.4730000
000002 1000 51000 2013-12-17T10:25:49.4230000
000002 3000 48000 2013-12-17T10:26:07.4800000
If i run this;
2.
Select Customer_ID as Customer, sum(Credit) as Credit, sum(Debit) as Debit, (count(Credit) + count(Debit)) as Count from ThriftsTrans Where Transaction_Date Between '15/Dec/2013' And '18/Dec/2013' Group By Customer_ID
I will get;
Customer Credit Debit Count
-------------------------------------------
000001 19000 2000 4
000002 51000 3000 3
and lastly if i run;
3.
Select Customer_ID as Customer, Account_Balance as Balance, Transaction_Date as Date From ThriftsTrans Where Transaction_Date In (Select Max(Transaction_Date) From ThriftsTrans Where Transaction_Date
Between '15/Dec/2013' And '18/Dec/2013' Group By Customer_ID)
I will get;
Customer Balance Date
-------------------------------------------
000001 17000 2013-12-17T10:23:08.6470000
000002 48000 2013-12-17T10:26:07.4800000
But my problem now, is how do i combine query 2 & query 3 to get the following output from my database;
Customer Credit Debit Count Balance Date
---------------------------------------------------------------------
000001 19000 2000 4 17000 2013-12-17T10:23:08.6470000
000002 51000 3000 3 48000 2013-12-17T10:26:07.4800000
Please help me and thanks a lot in advance.
|
|
|
|
|
I suggest you start exploring the wonderful world of JOINs. Identify the common field (foreign key) and create an inner join then select the filed you need from the 2 tables.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Thanks Holmes,
I know the solution to my problem can be solved by using one of the JOINS. But my challenge is that my little brain is not just connecting me to the appropriate JOIN to use.
I tried using a CROSS JOIN but the errors thrown shows that i am not formulating the query properly at all.
Please help me.
thanks a lot
|
|
|
|
|
paul4everyone wrote: I tried using a CROSS JOIN but the errors thrown shows that i am not formulating
the query properly at all. Why didn't you share those details in your question?
thatrajaCode converters | Education Needed
No thanks, I am all stocked up. - Luc Pattyn
When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is - Henry Minute
|
|
|
|
|
because what i did with the joins doesnt make sense.
i just messed up the query 2 and 3 using JOIN.
please help me
|
|
|
|
|
I suggest you start studying, this article [^]may be useful to you.
Never underestimate the power of human stupidity
RAH
|
|
|
|