« first day (2105 days earlier)      last day (2213 days later) » 

04:28
Good morning all
05:17
hi
Hey Bro @Brogrammer
i just started learning about databases
since i couldnt take any classes in college
i have to self learn mysql
so i can get a job
i know the basics only tho
how to create a database and a table
and to delete a database
and to show all current database
and to change which database you want to use
i wish i could say thats halfway there
but i think thats like 25 percent done?
05:34
@Brogrammer But I think thats like a 2 percent done. There are lot more to go.
Sorry for disappointing words. But you are in the right path, way to go, GET IT!!!
ahh
how much percent of mysql do u think this covers
this is where im self learning my information
@Sankar
They talked about DML, DDL, Primary Key, Types, Some Builtin function and relationships in theoretical, i would say these are less than enough for a professional.
First of all, If i was you I won't rely on some blog like this to learn basics. I would go for a standard documentation right here : dev.mysql.com/doc/refman/5.7/en/tutorial.html or a dedicated tutorial site like this: mysqltutorial.org.
There you can see the bunch of concepts you need to learn @Brogrammer
 
2 hours later…
08:21
morning
morning @AndyK
Julia Silge on November 13, 2017

Life as a developer (or data scientist, in my case) involves being comfortable with changing technologies. I don’t use the same programming languages that I did at the beginning of my career, and I fully expect to be using different technologies several years from now. Here on the Stack Overflow blog, we’ve talked recently about technologies that are shrinking in popularity and those that are growing, but sometimes a programming language, framework, or technology comes out of nowhere and bursts on to the scene, or falls off a cliff. Sometimes there are dramatic shifts in a technolo …

@Sankar sup?
As usual, ASP Web form stuffes
how about you?
@Sankar yesterday's eve was a success
17 peeps
ooh woww
Congrats
08:27
Morning guys
@Zulatin o\
Presentations are the nastiest thing in school
sigh
only back at schoo for 4 weeks
and we have to do 4 presentations already
hi btw xD
@Tomm hey man
ey lads
You seen that beautiful Kingdoms Come Deliverance game?
nope
08:34
man, that's some really really awesome job done
game came out like week ago or so ... medival times, so realistic
details, every action has consequences, guys just nailed how awesome they did it
08:48
@HéctorÁlvarez yesterday when you guys were helping me with c# what does the += do in the for loop result
what does += stand for
cause that is what made my loop, actually loop per value
don't you just love traffic?
I love traffic so much
it adds on value .. like 2 += 3 is equal to 5
so its just adds right value on left
or string like "Hello " += " Tomm" ... will end up "Hell Tomm"
hello*
so its basically 1 + 1 = 2 without specifying the increment
1 + = 2
1 + increment = 2
no no .... see it like this
08:53
good morning
int a = 5;
int b = 3;
a += b;

a will be 8 now
a = a + b
is the same as
a += b
exactly
08:53
@Tomm it adds the value on the right to the variable on the left
like a join
xD
more like sum
:D
@Tomm left join
sum wont join strings @Zulatin
basically speaking it goes as follows:
a += b --> a = a+b
a *= b --> a = a*b
a /= b --> a = a/b
08:55
morning guys
i get it
ty guys
and then you have stuff like
a++ --> a += 1 --> a = a+1
a++;
a--;
those 3 operations are similar
08:56
those are the things i use in for loops
i understnand those
by the way
but they don't have to be in loops, they can be anywhere
a++ doesn't equal ++a
the value always has to be infront of the (++)
09:01
Both works different.
int i=1;
Console.WriteLine(i++);
Console.WriteLine(++i);
output will be:
1
3
++i is that +1+1+1
++i is increment then return.
i++ is return then increment.
@HéctorÁlvarez \o
@Tomm no
i++ returns i, then adds 1 to it
++i adds one to i, then returns i
09:45
guys do you know if it's possible in SSRS to debug a dataset query?
I have some parameters and have been told to NOT use filters, but instead put the conditions in the query
10:06
hi guys
I have small question here
suppose I have a table which contains new columns then How can I alter table to add new columns to the table
alter table YourTable
add YourColumn ColumnType
if you wanna add new column to existing table
That is so simple you would find it if you typed that in google.
but I don't really understand question, you have table which contains new column, then how you alter table to add new columns ...
confusing stuff right there
Nope no confusion
let me explain you
I have new table from production and I want to update my local table with new columns from production table
How can I achieve this..
ohh now we talking
10:10
sorry im back, had to do some presentations sigh
ok, you know names of the new columns from production?
are there like 2-3 or many more like 20 or so?
yes both are same
and is it oracle? sql server? my sql?
just 5 columns
mysql
aaaaaaaaaaaaaaaaaaaand im out
just kidding ... well just write down alter table command
10:11
this is the problem ..
I want concrete solution for the same
i can do this
mysql is my ground
what is the question what do you want what is the problem
like I will execute something and it will give me all columns alter queries
@Tomm read my question above please
your quetion is unclear
can you specify
I have new table from production and I want to update my local table with new columns from production table
BTW! I am heidiSQL ..it will help somehow?
so you want to insert columns from your production table to the local table
10:14
Anyone got tips on troubleshooting performance on SQL server, like bottlenecks?
@Tomm yes
i got you
wait a sec
INSERT INTO `destinationtable`( destinationcolumn )
SELECT existingcolumn
FROM `existingtable`
Dude this is insert statement and not Alter query which will add newly added column into production to my local table
m8
actually
sigh
then explain your problem
this takes column values form table a puts it in table b
exaclty what you asked
guys any idea why this returns error for me?
CONVERT(varchar, '2017-08-25', 101)
Incorrect syntax near CONVERT
incorrect syntax near varchar, expecting '(' or SELECT
10:22
isnt it select convert
@Tomm If you read my question properly then you will come to know that I have new columns added into my production table by other developers and I want to get all those newly added columns in my local table.
not data
@Exception then use my answer.....
actually if you opend google and searched this question
you get results
similiar to mine
and if you actually read the code instead of seeing its insert instead of alter
you would know its correct
@Tomm the query is huge, I omitted the rest of it
take this for example
CONVERT(varchar(10), '2017-08-25', 101)
try that
SELECT * FROM foo WHERE date BETWEEN CONVERT(varchar, '2017-08-25', 101) AND CONVERT(varchar, '2017-08-26', 101)
10:24
try giving length to the datatype you are converting it to
still breaks
varchar = varchar(max)
that shouldn't affect the output I guess?
ohhhhhhhhhhhhhhh
im still clueless xD
btw CONVERT(date and CONVERT(datetime don't work either, I tried just in case
hmmm
@Tomm and I though you know already .I have searched google already but no luck :(
10:29
ill get back to you after im done releasing
this project.
@Exception my answer is good
stop thinking rainbows
not everything is exactly as you visualised it thats why your solution isnt working
trial and error
you cant just say this doesnt work this is not what i asked for
@Tomm one day i will come up with solution to this. :)
I HAVE THE SOLUTION
someone stop me before i end up opening my mouth sigh
@HéctorÁlvarez
what's your format in 'date' column.
@HéctorÁlvarez you will need to make it work like this.
WHERE Convert(varchar, date, 101) BETWEEN CONVERT(varchar, '2017-08-25', 101) AND CONVERT(varchar, '2017-08-26', 101)
@Tomm everyone is busy ;)
10:36
@Exception which SQL engine are you using in your production environment?
sql server, mysql etc..?
mySQL
@HéctorÁlvarez It makes no sense to me
why you need a CONVERT here
SELECT * FROM foo WHERE date BETWEEN  '2017-08-25' AND '2017-08-26'
its enough i think
because the input is an SSRS parameter
@HéctorÁlvarez try converting the column as varchar too
@ARr0w I can't
Okay, copy-paste from the query
SELECT
       [Validfrom] ,
       [Validto] ,
       *
FROM
     [Dbo].[SomeTable] FOR SYSTEM_TIME BETWEEN CONVERT(NVARCHAR, @prmDateFrom, 112) AND CONVERT(NVARCHAR, @prmDateTo, 112)
10:45
@Exception execute and pick out new column names from result of this query

SELECT `COLUMN_NAME`
FROM `INFORMATION_SCHEMA`.`COLUMNS`
WHERE `TABLE_SCHEMA`='yourdatabasename'
    AND `TABLE_NAME`='yourtablename';

then alter table with those column names. You will need to execute two queries for this operation.
wait whats the type of SYSTEM_TIME @HéctorÁlvarez
^ good question
i also asked this earlier.
SYSTEM_TIME is a date of a temporal table that belongs to MSSQL system versioning
Nvarchar or Varchar is not a good answer though :D
datetime I believe
10:48
thank god
then try without CONVERT
and those parameters contain a datetime datatype ?
then as sankar said, why converting bro?
the problem is that SSRS takes different date formats depending on the agent
doesn't matter
try without
10:49
@ARr0w +1
first
so if I use the browser, when I do from 1/2/2018 to 21/2/2018 (in this format) I don't get the results I need
because it filters out weird
SQL Server doesn't support dd/MM/yyyy format.
hector then try DATEDIFF(month/year/day, 'startingdate', 'endingdate')
wait a minute, I am getting the right results, it's just that the end date doesn't get in the range
10:52
after converting your parameters to varchar
@Tomm hahaha nice answer.
@ARr0w you also didn't get it
@ARr0w xD
@Exception we get it... You do not get it
@Exception

you want a whole query to do it automatically? that's what you are looking for?
that it should get the new added columns and adds them to your local db's table?
10:58
@Tomm nice one, saw the notification on my phone and came immediately
i actually tried to write

alter table tblname add (select COLUMN_NAME + 'Varchar(max)' from INFORMATION_SCHEMA.COLUMNS Where TABLE_CATALOG = 'dbname' AND TABLE_NAME = 'tablename')

but this seems to have a syntax error.
@WhatsThePoint that sounds relatable
@Exception First of all, By using query, how will you check the missing columns in the table which is in another server.
!
The problem is that we have @Exception his answer but i dont think he understands his own question
good morning guys :D
11:02
morning @Mofty
afternoon mofty ;p
still morning here @Tomm
god dammit, I can't even use DATEADD, it's the damn end date without time screwing my report
damn you Gates!
DateDiff? you have a range right?
11:12
DateDiff is a Sql-server's built-in function? which will takecare of the varchar values too?
DATEDIFF(month/year/day, 'startingdate', 'endingdate')
@Exception something like this?
SET @col = (SELECT top 1 column_name
			from information_schema.columns
			where table_schema = "production_database_name"
			and table_name = "production_table_name"
			and column_name not in(SELECT column_name
								   from information_schema.columns
								   where table_schema = "local_database_name"
								   and table_name = "local_table_name"));


exec("alter table local_table_name add " + @col)
@ARr0w but what does it do to help me?
it only takes the difference between 2 dates
why can't you use DATEADD?
apparently functions aren't supported within the FOR SYSTEM_TIME subclause
@HéctorÁlvarez knowledge :D lol :P yeah, im too sleepy.
11:19
maybe I can hack it by setting the end date to 23:59:59
@WhatsThePoint How could you query the database which is in another server?
oh is it on a different server? if it is I don't think its possible in a simple query
@WhatsThePoint its okay, we still have faith in you <3
:D
is it even possible to query different servers?
you can use linked servers
11:26
I think the only way would be to delete local, take back up of production and restore backup onto local
@WhatsThePoint yes we need to fetch it from information schema itself
if theyre on different servers I don't think its possible to do a query for it
YES
WE ARE FINALLY GOING TO USE MSSQL AT SCHOOL
FUCK YES
TIME TO OUT SMART MY CLASS MATES
@Tomm be like "Hey b'tch, I'm level 540 SO marshall, eat delete from without where" dabs uncontrollably
11:39
@Exception I could write a c# program to do the required task if you want?
hahah @Tomm @HéctorÁlvarez
@Exception do you want to keep the data?
did I say I wanted to move on?
@AndyK move on to/for/why/hello_how_are_you?
@ARr0w You asked my all questions :D
11:46
its not software but anyone got any ideas?
when I click my personal onedrive in file explorer, it opens it but also opens onedrive for business in a new window
@Sankar xD
@WhatsThePoint nope
12:02
first day back at uni i went on stack overflow and someone said wow you have 540 rep, i went to his profile and he had 9 rep i flagged his question and now he is upset :)
lol, @Tomm you've got some nurves :P
yes :)
@WhatsThePoint microsoft programs are shady, you probably have an icon in the tray for OneDrive Business that you can right click > settings and find some checkbox about "automatically open OneDrive Business when OneDrive starts"
@Tomm you're on discord?
yes
12:07
name?
check discord
13:06
@HéctorÁlvarez sorry was on lunch, I don't think its that, I've been having onedrive for business issues lately so I contact my company IT dept, they told me that having personal one could cause issues (which I know is bullshit) so I told them id removed it and it still was having issues, they remoted on and messed about with it and now its doing the open new windows stuff
@Tomm show me the Q
@WhatsThePoint its deleted already
did he delete it?
no it got taken down
13:21
was it that bad?
13:46
@Shaneis
question
is there a way to do one-liner with powershell like with awk?
@Tomm bwahahahahah
lol "Hello, I'm Tomm and just took your shitty question down. Please to make your acquaintance"
"I'm glad we can work together, please let me know if you post more shit so I can advance toward my marshall badge faster"
xD
im off for today
bye
bye @Tomm
@Tomm cya
13:59
later @Tomm
14:34
0
Q: Running a script block for powershell

Andy KWhen running the part below through powershell prompt, it does what it is supposed to do , change anything that contains MYID to MyValue. (get-content c:\tmp\test.txt) | foreach-object {$_ -replace "MYID", "MyValue"} | set-content c:\tmp\test.txt Yet when I'm running it through a script block ...

14:48
@AndyK have you tried putting the command between quotes?
powershell -scr "blablabla"
@HéctorÁlvarez nope, that not work
During my college days, I have been thinking, power shell is the colored version of command prompt. :P What a noob I was.
yeah, powershell is awesome
where do you run this powershell -scr command
doesn't work for me in the command line
is it python?
@HéctorÁlvarez no , powershell
Later guys
i'm off now
15:04
@AndyK what does -scr stand for?
@Sankar o/
@HéctorÁlvarez script block
there is even simpler
(Get-Content c:\temp\test.txt).replace('[MYID]', 'MyValue') | Set-Content c:\temp\test.txt
15:24
@HéctorÁlvarez this is the answer
powershell -Command "& {(get-content 'c:\tmp\test1.txt') | foreach-object {$_ -replace 'MYID', 'MyValue'} | set-content 'c:\tmp\test1.txt'}"
15:46
@AndyK Nice
I had never used -scr
then agian, I'm not a prime powershell user
guys, anyone aware if it's possible to unfold the * in select * to show all the columns automatically?
 
1 hour later…
17:02
dammit now I want to cross a system-versioned table with the linked tables
and it's not valid syntax
I made it weeeeeeeeeerk
17:53
im out for today

« first day (2105 days earlier)      last day (2213 days later) »