« first day (1868 days earlier)      last day (2450 days later) » 

user7912927
4:45 AM
gm guys :)
 
4:56 AM
good morning
@Nias I'm having a problem querying, think you could help me wrap my head around it? i'm stuck at the moment
 
user7912927
let me see, whats it
 
I'm trying to do an inner join on 4 tables which have the same 4 columns and trying to do the sum of a specific column between the 4 tables (the quantity column)
the important part for me is the sum
 
user7912927
yeah
 
so the tables have an ID a unique identification code, a description of that code and a quantity of how much of it there is
 
user7912927
yeah..ok
 
5:02 AM
i basically need to group them by the unique identification code and calculate the sum of the quantity between these 4... I've been doing this for the last hour and don't know where I'm messing up
 
user7912927
can you show me the table structure?
 
user7912927
can u take a screen shot and upload it here?
 
hm, how do i post a print screen here
 
user7912927
can u see a upload option?
 
no i have none
:-/
 
user7912927
5:04 AM
i think we need 100 reps for it
 
ah, dang
well i guess it's back to the drawing board xD
thank you anyway :)
 
user7912927
whats the error u getting?
 
hi can anyone pls help?
I am stuck with this for days?
0
Q: Sql to select and extract 10 characters before and 10 characters after a substring in Oracle Clob

user3376592Let's consider the text example below: Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It h...

 
i can't group them apparently and it makes no sense that i can't
 
@ad
@AdiMohan did you respond to my question?
 
5:19 AM
@user3376592 When it comes to oracle i have no idea what so ever, wish i could help in any way :-/
 
@adi
@AdiMohan no problem.. thanks
 
 
1 hour later…
6:49 AM
@CrashBandicoot No problem man. Its okay. Eid Mubarak to you too man
 
user7912927
@ARr0w how are you bro? long time here
 
hi @Nias
yeah i was off for the holy Event holidays
:P
 
user7912927
yeah, i know that :)
 
i'm good though. How're you bro? :)
 
user7912927
i'm good.... working with the replication of databases :)
 
7:16 AM
that's great. Keep learning man. I guess you must be specializing in databases.
 
morning guys
 
morning man
 
7:35 AM
how was the feast?
 
Awesome.
but a little emotional as well
saying good bye to two friends flying to two different countries. One to Greece, second to Dubai.
 
morning guys
 
8:05 AM
wow @ARr0w
o/ @Sami
 
Hey, @Sami
 
user7912927
@ARr0w if u guys are there with me ;)
 
@AndyK @ARr0w o/ hey
 
@ARr0w Greece is tough... Very economically oppressed nowadays due to the Euro commission
 
yeah @AndyK , that doesn't concern my friend whose flying there. He's going for flying lessons there to become a pilot. its a 14months course. 3 down 11 to go
 
8:12 AM
@ARr0w that's good
 
@Nias of course, we will help you to learn. Not literally going to build queries and leave you on a basic level.
@AndyK indeed, the second one is at dubai for his career. I pray for him that he becomes what he wishes for himself.
 
0
A: LEFT JOIN on two or more tables

SamiTry this: Declare @Products Table (product_id varchar(25) , name varchar(50) , category int); Declare @Settings Table (product_id varchar(25) , title varchar(50) , color varchar(25) , user_id int); Insert into @Products values ('PROD1' , 'SM-W620NZKBDBT' , 2) , ('SOFT1' , 'MS-UIOA2189090' , 2)...

@ARr0w Can you give some advices?
I want to start learn C#
 
@Sami sure and wait
 
8:28 AM
ok
 
c# is based on OOP
first get some knowledge of OOP (go theory, read some stuff)
 
I have knowledge of OOP with Delphi @ARr0w
 
then start this tutorial -> C# tutorials
 
morning all
 
Hey hey @Shaneis, morning and how's you mate!
 
8:30 AM
@Shaneis Morning
 
good good man, sitting down with a coffee and some code ;)
hey @Sami
 
See the expected resault and my answer and tell me if something wrong @Shaneis
 
@Sami cool, hold on
 
hi @Shaneis
 
hey @AndyK
 
8:32 AM
@Shaneis sup man?
 
@AndyK hectic week mate, trying to do some code for dbatools, then maybe a blog post, then I can get some relaxation in
how's you and postgres going?
 
brb
 
@Sami, your answer works for the example :)
ThatMikhal guy makes a good point though, up to the questioner I guess
 
I've found some solutions
feel like I'm hustling tbh
 
9:06 AM
Good hustling or bad hustling?
 
good hustling
 
Boom!
 
issue is that you cannot always hustle
things is that I feel that I'm hustling often recently
too much Guerilla warfare style here
I need more some kind of strategic thinking
that is sorely missing here
 
9:39 AM
what the hell happened to sql fiddle. :S
 
@AndyK pareto principle?
 
 
did you refresh?
 
yes several times
okay loaded correctly now
 
yeah I feel ya @AndyK
 
9:43 AM
1 message moved to friendly bin
@Shaneis all these efforts for a tiny result
 
9:54 AM
Clean
 
@Shaneis

http://sqlfiddle.com/#!6/506a6/2

This is the schema with test data and the query i build to return as money.

last 4 rows are 10, 100, 1000, 10000. these are actual amounts without any decimals

my objective was to return this amount as money with decimal placements of -2 to get last 2 digits as decimals only where there are numbers and not zeros.

the current error occuring cos of "LEN([xml]) -1" from below code. But i need this for the rest of the rows and im confused that how can i handle another case in already case when's syntax :/
above last 4 rows is a list is from 'database'
but the query is a fail if it can't handle the last 4 cases as well
 
10:12 AM
Morning
 
hey @CrashBandicoot
 
hey @AndyK
What's up?
 
busy as hell
 
morning @CrashBandicoot
 
Morning @ARr0w
 
10:30 AM
morning guys
sorry @ARr0w, was in a meeting, just add another case mate :) ;)
 
i can't @Shaneis its giving me an error "invalid syntax near when"
or am i mistaking somehwere
 
what's your double case statement @ARr0w?
 
this is what i am trying. But i removed it man..
Select convert(varchar,
cast(case when case when SUBSTRING([xml]
,LEN([xml]) -1
,LEN([xml])
)>0
 
yeah CASE WHEN CASE WHEN doesn't work unfortunately
I'm runnning through your code now
why Len([xml]) -8?
why -8?
 
10:49 AM
because of some weird space from 'xml' file
xml file stores this statement as varchar in the database.
shaneis , if you remove this statement from insert ..

('0PKR0'),
this query will execute
sqlfiddle.com/#!6/af6a5/1 see this .. this is without the above row in database
but i also need to handle the case with 0PKR0 data. as the debit amount is zero. :/
 
hmm have you TRY_CONVERT?
 
you just introduced me to try_convert
:o
'try_convert' is not a recognized built-in function name.
@Shaneis

	Select convert(varchar,
			           cast(case when SUBSTRING([xml]
											 ,LEN([xml]) -1
											 ,LEN([xml])
									)>0 OR SUBSTRING([xml]
											 ,LEN([xml])
											 ,LEN([xml])
									)>0
addition in the code .. http://sqlfiddle.com/#!6/506a6/5

But now i need to get rid of the error
Conversion failed when converting the varchar value 'R0' to data type int.

which is occuring cos of "LEN([xml]) -1" on this row "('0PKR0')"
('0PKR0') is ZeroPKRZero
 
11:20 AM
i just realized i can't use this :P

OR SUBSTRING([xml]
,LEN([xml])
,LEN([xml])
)>0
 
lol
@Shaneis +100 not 10 for the TRY_CONVERT()
@ARr0w :p
 
@Sami help me if you can im stuck at this point brain stopped working :P
 
11:42 AM
@ARr0w Sorry I can't , you can ask @Shaneis he is the prof :p
 
sorry @ARr0w, @Sami I'm in and out all day...give me a bit @ARr0w and I'll see what I can do
 
he certainly is professional.. @Sami just busy atm.
Its okay @Shaneis no issue. Take your time man.
 
Hi all
 
11:57 AM
hey @Alex
 
Hey Shaneis
 
can you grab a look at @ARr0w's Q for a sec?
 
Sure
 
hey hey @Alex
 
cheers mate, trying to make some time but slightly swamped right now
 
11:59 AM
Hey @ARr0w
 
@Shaneis take your time bro. Its totally cool (Y) <- thumbs up
http://sqlfiddle.com/#!6/506a6/10 - @Alex this is the fiddle,
there is an error there. The cause of this error is when this function executes
"LEN([xml]) -1" on this row "('0PKR0')" its -> ZeroPKRZero
but there are other rows too there-for i need this function.
 
Can you use something like this to test if it's an integer? stackoverflow.com/a/2368954/177416
Then do the cast, else do something else
I've successfully used that before for int tests
 
actually @ARr0w I think its this bit
,LEN([xml])-8
 
no bro @Shaneis
i just resolved it

http://sqlfiddle.com/#!6/506a6/11
 
ah cool, well done man!
 
12:06 PM
Good job, @ARr0w!
Sorry couldn't help
 
nah you guys did
i got stuck and my brain was tired. so i put the question here. Relaxed my mind. Re looked at it and i guess my mind worked.
you guys took my stress for a while <3
:D
 
@ARr0w We got no problem doing that man ;)
 
thanks man <3
 
Hi @AndyK
 
Hi @Alex
sup man?
 
12:11 PM
Not much. Was looking at the cool SQL ARr0w had written in that SQLFiddle
How are you?
 
busy
I wish to have more time
 
The busier we are, the less we worry about life
Not a bad thing, really
 
I like to see where I'm going
The anxiety when you are idle is terrible but it is a price to pay to build your road the way you want
 
Indeed, planning and analysis are important
 
I see tons of guys who run all the time, at the end, their wives have left, their kids too, their job gone to someone younger and more qualified
I like my time :)
 
12:22 PM
Might marry some day, but if it doesn't happen, won't cry over it. Too many bad marriages out there.
Anyone going to get hitched (male or female) should watch Married with Children
 
ha ha
 
Feel like the show is a documentary!
 
@Alex wow nice philosphy :D
2
 
Thanks!
Marriage is an institution, and you should be committed to it.
 
hi
can anyone help me with this pls? stackoverflow.com/questions/44767286/…
 
12:35 PM
LMAO on this one
22
Q: A friend/coworker and his wife are employed at the same company. He found out she's cheating. What to do?

AnonymouslyUpsetFull context: I've been at my job for about a year and have formed close bonds with a number of people, including my coworker "Josh". A new position opened up recently that Josh's spouse, "Jessica", was a perfect fit for, and she ended up getting the job. The day after Jessica got hired, Josh fou...

 
Talking about marriage... hehehe!
 
empathy guy and josh sounds the same person
 
lol
 
finalized and done! sqlfiddle.com/#!6/48b44/1 .. Damn it took my day -_-
 
Marriage
 
 
1 hour later…
1:56 PM
alright guys i'm off
happy marriage to you @Alex :D
 
See ya, ARr0w
 
later folks, take good care of yourselves
 
Hehehe!
"Happy marriage" -- doesn't exist!
 
see ya @ARr0w
 
see ya @ARr0w
 
2:51 PM
heading early guys, talk to ya
 
see ya Shane
 
3:30 PM
bye guys
 
See ya, Shaneis, Andy
 

« first day (1868 days earlier)      last day (2450 days later) »