« first day (1565 days earlier)      last day (2753 days later) » 

7:22 AM
@Shaneis depends on what you thought I meant
 
7:41 AM
@ARr0w 1 or 3 on the tests I've done...i have it in my head as "store only part of me" :)
@StevenLiekens migrating all the data in your database to a new one, potentially with different schema/tables/etc
Again, not fun though
 
8:07 AM
morning
 
Morning @AndyK
 
how's tricks?
 
8:26 AM
Sorry, only back online now. Fatality on the tracks so all the trains were delayed
 
you are english, right?
 
Irish, living in London
Slight difference :)
 
aha
Mad London
 
Yeah pretty much, glad I moved here though.
better job experience
 
Yeah London is cool for that
 
8:28 AM
software support ("have you tried turning it off and on again") to Junior DBA
 
that's cool
 
Never actually asked where you were @AndyK?
 
Last year I was in Paris and now, I'm in Poitiers
it depends on what kind of software support you are providing but I enjoy software support
it gives you a better insight into the user experiences and see what not to do when building a software
 
True that, true that
Poitiers nice!
spent a while in Clermont years ago, but my French is horrible now again
 
ha ha
everyone speaks english now
 
8:35 AM
Kinda what happened in Clermont as well, English was the universal language
 
found out that one of my neighbour was born and bred in Greenwich
you can't make that up
 
Bahahahaha!
Of course!
 
9:13 AM
Hello Guys
Can you pls help me to solve one problem? I am working on symfony2 project and one of my colleague has used doctrine2 native query in whole project instead of prepare statement.
Right now, the problem is when i use " ' " (Single Quote) in where cause. doctrine returns "[Syntax Error] line 0, col 143: Error: Expected Doctrine\ORM\Query\Lexer::T_CLOSE_PARENTHESIS, got '%'" error
Do any one have any idea to solve it in native query?
 
hey @Sameer we are doing sql here, not php
 
@AndyK, thanks for reply. actually its dql problem (Not PHP). I am searching for solution that allows single quote in native query.
 
@Sameer please use ctrl+k for any code you will paste here
Will something like that be enough?
<?php
$query = $em->createQuery("SELECT u FROM User u JOIN u.address a WHERE a.city = 'Berlin'");
$users = $query->getResult();
 
9:39 AM
Yes but when i tried with below query, error occurs
<?php
$query = $em->createQuery("SELECT u FROM User u JOIN u.address a WHERE a.city = 'Ber'lin'");
$users = $query->getResult();
 
Your query
$query = $em->createQuery("SELECT u FROM User u JOIN u.address a WHERE a.city = 'Ber'lin'");
The query I've sent you
$query = $em->createQuery("SELECT u FROM User u JOIN u.address a WHERE a.city = 'Berlin'");
 
Query you have sent me is working fine. But, I have problem with query with single quote in where condition. that i have sent you
 
be clear @Sameer like when you are asking a question on normal SO
 
Oke i think we both are not clear on topic
thanks
 
9:56 AM
for your issue
will a \ work?
$query = $em->createQuery("SELECT u FROM User u JOIN u.address a WHERE a.city = 'Ber\'lin'");
@Sameer
 
10:12 AM
think he's gone @AndyK, what were you thinking anyway? problem with an escape character?
 
yep
 
wonder why he's looking for something like "Ber'lin" anyway
bad data shakes head
 
don't know @Shaneis. anyway ... head shake
 
10:39 AM
@Shaneis okay apparently "migration" means different things to different people
 
@StevenLiekens 1 of a lot of things :) What are you talking about though?
 
migrating a database to a newer version
for example adding a column to a table is a migration
especially if data needs to be moved around to facilitate that change
 
oh yeah, no, you're right that's database versioning migration
only just started it recently
but we use TFS
and RedGate Source Control
 
we don't have the money to bow for redgate
so 'spensive
 
Fair enough, you can do it manually, just takes a bit more effort and A LOT more planning to make sure you can rollback/commit migrations
 
10:43 AM
yea lol
we do it semi-manually
 
Check out Grant Fritchey and Steve Jones blogs
they both work for RedGate but have great blogs on doing it manually
 
we write migrations ourselves in plain old SQL script files
but we have a tool that runs all scripts in order
 
@StevenLiekens yeah?
sounds like you're building an in-house migrator :)
 
I'm considering pushing for redgate readyroll
because that's basically what we do
but again... so expensive
for something we can already do for free using open source tools
 
yeah...and, well, is there anything wrong with your current way of doing it?
 
10:45 AM
it's... a lot of work
tends to break in mysterious ways
hard to recover from failures
 
Mind if I ask what tool you use to run the scripts?
 
it's like ReadyRoll but without visual studio integration
 
right, I'll have to read up on that
back to your thing though...up to you now
do you a). want to spend the time on documenting/improving the processes on your current setup so you get less and less breaks and easier to recover from failures, or b). pay for readyroll
no wrong choice to be honest...
 
going with A right now
but I was wondering if anyone has used similar migration tools and want to share their opinion
 
are there open-sources tools for migration?
 
10:51 AM
roundhouse is open source
 
@StevenLiekens fair enough, I will say that we're using RedGate but still improving the process for migrations
just because we have the tools doesn't mean everyone is using them right
 
we're using roundhouse wrong but we're aware of it
we would probably have less issues if we used it right
 
@StevenLiekens not really...we're using RedGate right but need to improve our migration scripts
 
I thought the whole point of redgate tools is that migrations are automatic?
 
Migrations are automatic but if you write a script that changes a function from SELECT @@SERVERNAME to TRUNCATE TABLE
THAT shouldn't be allowed
Our tools are good, we just have to improve our internal processes first
 
10:55 AM
ah
 
 
3 hours later…
1:41 PM
Hello how are you? My question is: i have a table with this situation
id valueA valueB
1 null b
1 a null
2 a b
...

and i want as a result

id valueA valueB
1 a b
2 a b
...

i can t seem to find a way to do this. can you please help? thanks!
 
@GuidoCelada what have you tried?
 
hey @GuidoCelada can you format your code, please?
and show us what you have tried so far
thanks @Shaneis
 
ive tried coalesce function
with inner join
but i have duplicates on the result
 
can you show us your query, please?
 
yes but its pretty big
the actual query.
i wanted to simplify the problem for this chat.
 
1:46 PM
pasteofcode.org
 
let me try in a sql fidle
 
2:09 PM
well i guess its not working.
but here it is
 
CREATE TABLE foo
(
id1 int,
id2 varchar(255),
AttributeA varchar(255),
AttributeB varchar(255),
AttributeC varchar(255),
AttributeD varchar(255)
);

CREATE TABLE bar
(
id1 int,
id2 varchar(255),
AttributeA varchar(255),
AttributeB varchar(255),
AttributeC varchar(255),
AttributeD varchar(255)
);

INSERT INTO foo VALUES
(1, 'A', 'a', null, null, null),
(1, 'A', null, 'b', null, null),
(1, 'B', null, null, 'c', 'd'),
(2, 'B', null, null, 'c', 'd'),
(3, 'A', null, null, 'c', null);

INSERT INTO bar VALUES
 
i need in the table result id1+id2 to be unique
with all the attributes of that id1+id2 merged
 
2:24 PM
id1 + id2 need to be unique?
But your join is on foo.id1 = bar.id1 **AND** foo.id2 = bar.id2
so they have to be unique but they also have match each other
is that right?
 
yes
i need like a group by
but i need to select all...
 
id1	foo_id2	bar_id2	AttributeA	AttributeB	AttributeC	AttributeD
1	A	A	a	b	NULL	NULL
so that's going to be your output then?
 
2:39 PM
i might have the answer.
group by doesnt let you select all the attributes
but you can do it like this
SELECT PACIENTE_FECHA, MAX(FENOTIPO) AS FENOTIPO
FROM GRH_LABORATORIO_ADAPTER
GROUP BY PACIENTE_FECHA;
using functions.
im going to try this aproach
 
Souns good, go for it
 
3:33 PM
i think it works
:D
 
cool
 
Good to hear!
 

« first day (1565 days earlier)      last day (2753 days later) »