« first day (95 days earlier)      last day (97 days later) » 
03:00 - 11:0011:00 - 15:00

03:06
Morning
@Elahe ur pic is too good...
03:31
Hi every one
thanks @TheDictator
04:13
@Wulworine can I ask a question?
yeah sure..
SELECT         dbo.QMS.isActive, dbo.Branch.name AS BranchName, dbo.Company.name AS CompanyName, (CASE WHEN ([Order].done = 'True')
                         THEN CAST(1 AS Bit) ELSE CAST(0 AS Bit) END) AS OrderDone, (CASE WHEN ([DefectReport].done = 'True') THEN CAST(1 AS Bit) ELSE CAST(0 AS Bit) END) AS DefectDone
FROM            dbo.QMS LEFT OUTER JOIN
                         dbo.Company ON dbo.QMS.lastUsedCompanyCode = dbo.Company.companyCode LEFT OUTER JOIN
                         dbo.Branch ON dbo.QMS.lastUsedBranchCode = dbo.Branch.branchCode LEFT OUTER JOIN
it returns a lot of records!
and I dont want to use DISTINCT
let me check
what is QMS?
@Elahe
its a table
yeah.. but, what type of records will be saved in that table?
@Elahe
04:23
hmmm...
what u mean?
what is the full form of QMS?
@Elahe
its just a table nimesh. like Company Table, User Table , ..
yeah but, i want know how the table is related to company. because u have taken that table first. that means the records will be multiply by record count in that QMS table.
ok, let me send u complete query
SELECT        dbo.QMS.QMSCode, dbo.QMS.QMSSerial, dbo.QMS.model, dbo.QMS.controlType, dbo.QMS.connectionType, dbo.QMS.generateType, dbo.QMS.isCamera, dbo.QMS.centralMonitorRowCount, dbo.QMS.TV_LCD,
                         dbo.QMS.callNumber, dbo.QMS.monitorNumber, dbo.QMS.centralMonitorNumber, dbo.QMS.description, dbo.QMS.lastUsedBranchCode, dbo.QMS.lastUsedCompanyCode, dbo.QMS.warrantyStartDate,
                         dbo.QMS.warrantyEndDate, dbo.QMS.warrantyType, dbo.QMS.lastCheckDate, dbo.QMS.isActive, dbo.Branch.name AS BranchName, dbo.Company.name AS CompanyName, (CASE WHEN ([Order]
it related to company by companyCode
try to take company first then QMS
04:38
I didnt get u
is that really u? @Elahe
yeah
@Elahe which is parent table order or QMS?
Hello @TheDictator
@fairybot hello
04:50
QMS
@Wulworine
ok
can u show me the result of ur query?
@Elahe
ok
hi all i have created 2 Dbs, First one is DB1, and the second one is DB2, and i have a user (testUser) that has a permission only to read from DB1 and (read\write) DB2, when i log in using this user, i noticed that he can also read the master db! how can i prevent him from accessing this database ??? Thanks
@Wulworine
05:06
change Left Outer Join to Inner Join
@Elahe morning
Nice change!!
Good morning @Justcode
Thanks ;)
No I need to have left outer join nimesh, bcz maybe some fields be null
I need them in my results
how can I distinct all my columns except of the last one?
CompanyName? @Elahe
no DefectDone
@Elahe
05:12
yeah
could you come in asp..net for a second?
ok invite me
so why u asking me to come in asp.net room @Justcode ?
@Elahe this is not possible that u can distinct only selected fields.. if u have placed all fields in select statement then distinct word will be return distinct values from all fields
aha
will tell u later
05:20
Ok
@Elahe did u get that message "Welcome back.." from justcode?
later? when?
yeah, I think!
ahan
exelent :)
@Elahe i think the problem is in joining.. try to create query using Query Designer
Query Menu->Design Query in Editor
no I know where is the problem
but I dont know how to fix it
 (CASE WHEN ([Order].done = 'True')
                         THEN CAST(1 AS Bit) ELSE CAST(0 AS Bit) END) AS OrderDone
where?
05:24
I should change it
I dont know how to explain that...
have u tried to execute that query after removing that statement?
yeah
it worked
@Wulworine alya atyar sudhi natu k?
nai yaar..
try like this `Cast([Order].done As Bit) As OrderDone`
@Elahe
05:27
nimesh it worked by distinct and also remove above code
but..
nimesh is it right?
                     (EXIST (SELECT        [DefectReport].done
                         FROM            DefectReport
                         WHERE        done = 'FALSE') ) THEN CAST(1 AS Bit) ELSE CAST(0 AS Bit) END) AS DefectDone
yeah but where is the where condition for DefectReport ?
WHERE done = 'FALSE'
no i mean product code or any?
@Elahe
05:36
I didnt get u :(
do u want I sent full new query?
is there any child or parent table which is related to DefectReport table? like QMS?
yeah
QMS
nimesh now my code have syntax error
I think u can fix it
it should look like this Where done='FALSE' AND [DefectReport].QMSCode = [QMS].Code
aha
let me try that
it cant recognized [QMS].Code
@Elahe u need to use that field which is related to QMS table instead of Code
05:46
I know
its QMSCode
but it cant recognized
What is the field name in DefectReport for QMS Code?
QMSCode
have u tried like this Where done='FALSE' AND [DefectReport].QMSCode = [QMS].QMSCode
yeah
repost ur full query
06:02
@TheDictator ?
@Elahe yah?
can u help me?
in my query?
yah sure... wha u want to do first tell me that
Its a bit difficult to explain...
I have 3 tables
QMS, DefectReport, Order
QMS is parent table
ok then
?
06:04
@Elahe????
and the other ones are childs...
I have a query that have syntax error
what error u are getting?
do u have time to check it? its long...
syntax error near ')'
@Elahe ???
do u have time?
06:05
actully have u checked ho many brackets u have taken?
yeah, I checked
Just show me your query
@Elahe
ok
@TheDictator profile picture has changed
06:09
what?
I didnt get u dictator
@Elahe that was for me.. just ignore that...
u can show me ur query... @Elahe
SELECT DISTINCT
                         dbo.QMS.QMSCode, dbo.QMS.QMSSerial, dbo.QMS.model, dbo.QMS.controlType, dbo.QMS.connectionType, dbo.QMS.generateType, dbo.QMS.isCamera, dbo.QMS.centralMonitorRowCount, dbo.QMS.TV_LCD,
                         dbo.QMS.callNumber, dbo.QMS.monitorNumber, dbo.QMS.centralMonitorNumber, dbo.QMS.description, dbo.QMS.lastUsedBranchCode, dbo.QMS.lastUsedCompanyCode, dbo.QMS.warrantyStartDate,
                         dbo.QMS.warrantyEndDate, dbo.QMS.warrantyType, dbo.QMS.lastCheckDate, dbo.QMS.isActive, dbo.Branch.name AS BranchName, dbo.Company.name AS Compa
sorry its too long
whats ur folt here if it is long then?
It lost ur time
I get error in this part:
(CASE WHEN (EXIST (SELECT        [DefectReport].done
                         FROM            DefectReport
                         WHERE        done = 'FALSE') ) THEN CAST(1 AS Bit) ELSE CAST(0 AS Bit) END) AS DefectDone
@TheDictator u r also saying that "Just Ignore him"?????
06:13
@Elahe EXISTS
u forgot s
there
aha
let me check
:) :) :)
thanks alot ronak
it worked :)
06:48
@TheDictator ?
can I ask question?
I post my question here, if there is any body how can answer me, plz help
SELECT DISTINCT
                         dbo.QMS.QMSCode, dbo.QMS.QMSSerial, dbo.QMS.model, dbo.QMS.controlType, dbo.QMS.connectionType, dbo.QMS.generateType, dbo.QMS.isCamera, dbo.QMS.centralMonitorRowCount, dbo.QMS.TV_LCD,
                         dbo.QMS.callNumber, dbo.QMS.monitorNumber, dbo.QMS.centralMonitorNumber, dbo.QMS.description, dbo.QMS.lastUsedBranchCode, dbo.QMS.lastUsedCompanyCode, dbo.QMS.warrantyStartDate,
                         dbo.QMS.warrantyEndDate, dbo.QMS.warrantyType, dbo.QMS.lastCheckDate, dbo.QMS.isActive, dbo.Branch.name AS BranchName, dbo.Company.name AS Compa
I want to know how to fix this part in this query:
(CASE WHEN (EXISTS
                             (SELECT        [DefectReport].done
                               FROM            DefectReport, QMS
                               WHERE        DefectReport.done = 'TRUE' AND [DefectReport].productCode = QMS.QMSCode)) THEN CAST(1 AS Bit) ELSE CAST(0 AS Bit) END) AS DefectDone
actually I want to create this condition for each records in my View
but I dont know how to do that
07:06
Does anybody have knowledge about android apps programming?
@TheDictator @Elahe ???
yeah, Im here
but I dont have any knowledge about that
this room is for .net
ohh.. sorry for that...
so, do you have a question about sql?
is this MySQL/SQL Server or Oracle?
yeah, sql
do u know sql server @Ghost ?
yes i know.. but not much...
so can I ask my question?
07:16
yeah sure
let me explain my question by picture!
r u still here @Ghost ?
yes
@Elahe
I want to group by my results by QMSCode and also
if there is DefectDone = False in that group, my new columns be False
else my new columns be true
I want to have this three columns to my results: QMSCode, QMSSerial, new Column
do u get me?
Select QMSCode, QMSSerial, Cast(DefectDone As bit) As NewColumn From YOUR_TABLE
Group By QMSCode, QMSSerial, Cast(DefectDone As bit)
@Elahe
let me check it
07:29
i should rather expose...
@Ghost
@Elahe
ok
what is it @TheDictator ?
07:50
does it working? @Elahe
no...
its true all the time
Select QMSCode, QMSSerial, (case When DefectDone = 'True' Then Cast(1 As Bit) Else Cast(0 As Bit) END) As NewColumn
From YOUR_TABLE
Group By (case When DefectDone = 'True' Then Cast(1 As Bit) Else Cast(0 As Bit) END)
@Elahe
let me check it
@Ghost I should go, its my breaking time. Im in work
I'll back
ok
08:15
@Elahe thats a Indian Movie....
M J
M J
08:55
hi Guys
@MJ hello
M J
M J
do you help to me to do Auto Launch My application of my .net project , i'm using sql server 2005 as backend
@TheDictator hi,
do you help to me to do Auto Launch My application of my .net project , i'm using sql server 2005 as backend
@MJ come on the ASP.Net Room...

ASP.NET

Welcome to ASP.Net Room. Don't ask to ask just ask your questi...
@MJ what does it mean by Autolaunch.. do u mean Autostart on Windows Startup?
M J
M J
@Ghost Autolaunch , i mean like that , user can download my msi from my site then if they install it , it will automatically download the sql server 2005 from ms Site, and will configure itself,
09:04
@TheDictator ?
do u said to nimesh come back?
@MJ if u r using visual studio setup then there is an option where u can specify installation file path.
@Elahe nop.... why?
Hello @Elahe have u checked that query? does it work or not?
not yet, Im comming now
I check ;)
M J
M J
@Elahe hi if you do Group by you have to use aggregate functions in it
09:07
hi @MJ
aggregate functions? like what?
M J
M J
@Elahe QMSCode, QMSSerial , This Column will have same values?
yeah
M J
M J
select discinct QMSCode, QMSSerial, DefectDone as NewColumn from youtable
@Elahe try this
no Its not work
DefectDone has not same values
@Elahe still that query does not working?
09:18
not yet
But Im tring do create it
let me try to create a sample database and try it.
What is the datatype of DefectDone? @Elahe
M J
M J
@Elahe select distinct QMSCode, QMSSerial, DefectDone as NewColumn from True
@Elahe select distinct QMSCode, QMSSerial, DefectDone as NewColumn from Yourtable
@Elahe Try This
I try that but it didnt work
M J
M J
@Elahe i tested it , could you check once agian
@Ghost Could you explain it breifly
09:28
2	366	0
2	366	1
8	36	0
8	36	1
9	13-256	0
the result was looking like this @Elahe
no
like this:
M J
M J
@Elahe then how your result will come?
2 , 366 , 0
8 , 36 , 0
9 , 13-256 , 0
Select QMSCode, QMSSerial,
(Case When ((Select Count(QMSCode) From QMS Q1 Where Q1.QMSCode=Q2.QMSCode AND DefectDone=0)>0) Then Cast(0 As bit) Else Cast(1 As Bit) END) As NewColumn
From QMS Q2
Group By QMSCode, QMSSerial
now my code is like this:
SELECT DISTINCT
                         dbo.QMS.QMSCode, dbo.QMS.QMSSerial, dbo.QMS.model, dbo.QMS.controlType, dbo.QMS.connectionType, dbo.QMS.generateType,
                         dbo.QMS.isCamera, dbo.QMS.centralMonitorRowCount, dbo.QMS.TV_LCD, dbo.QMS.callNumber, dbo.QMS.monitorNumber, dbo.QMS.centralMonitorNumber, dbo.QMS.description, dbo.QMS.lastUsedBranchCode,
                         dbo.QMS.lastUsedCompanyCode, dbo.QMS.warrantyStartDate, dbo.QMS.warrantyEndDate, dbo.QMS.warrantyType, dbo.QMS.lastCheckDate, dbo.QMS.isActive, dbo.Branch.name AS BranchName,
09:37
modify this statement
(Case When ((Select Count(QMSCode) From QMS Q1 Where Q1.QMSCode=Q2.QMSCode AND DefectDone=0)>0) Then Cast(0 As bit) Else Cast(1 As Bit) END) As NewColumn
@Elahe is it working or not?
no...
What is the table name where DefectDone field has created?
hi guys !
hi
What is the table name where DefectDone field has created? @Elahe
09:50
I fixed it @ghost thanks ;)
I don't think so... @Elahe
SELECT DISTINCT
                         dbo.QMS.QMSCode, dbo.QMS.QMSSerial, dbo.QMS.model, dbo.QMS.controlType, dbo.QMS.connectionType, dbo.QMS.generateType,
                         dbo.QMS.isCamera, dbo.QMS.centralMonitorRowCount, dbo.QMS.TV_LCD, dbo.QMS.callNumber, dbo.QMS.monitorNumber, dbo.QMS.centralMonitorNumber, dbo.QMS.description, dbo.QMS.lastUsedBranchCode,
                         dbo.QMS.lastUsedCompanyCode, dbo.QMS.warrantyStartDate, dbo.QMS.warrantyEndDate, dbo.QMS.warrantyType, dbo.QMS.lastCheckDate, dbo.QMS.isActive, dbo.Branch.name AS BranchName,
@Elahe
I think u r right @Ghost :)
let me check it
yeah @Ghost :) :) :)
thanks alot :)
it worked :) :) :)
just go ahead.... :)
and finish ur work
best of luck @Elahe
:)
thanks alot
where r u from?
India
10:03
nice
in nimesh company?
who is nimesh?
some one!
is this query right?
SELECT  DISTINCT
                         dbo.QMS.QMSCode, dbo.QMS.QMSSerial, dbo.QMS.model, dbo.QMS.controlType, dbo.QMS.connectionType, dbo.QMS.generateType,
                         dbo.QMS.isCamera, dbo.QMS.centralMonitorRowCount, dbo.QMS.TV_LCD, dbo.QMS.callNumber, dbo.QMS.monitorNumber, dbo.QMS.centralMonitorNumber, dbo.QMS.description, dbo.QMS.lastUsedBranchCode,
                         dbo.QMS.lastUsedCompanyCode, dbo.QMS.warrantyStartDate, dbo.QMS.warrantyEndDate, dbo.QMS.warrantyType, dbo.QMS.lastCheckDate, dbo.QMS.isActive, dbo.Branch.name AS BranchName,
I add a new column like u
yeah that's right
@Ghost
yes!!
10:06
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
it makes this error
don't add group by it is not require here
Column 'dbo.QMS.QMSCode' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
I think it required
yeah it is require but, when u going to use Distinct keyword then why r u using group by
I removed that but it has that error yet
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
can u repost that query?
10:14
ok
SELECT
                         dbo.QMS.QMSCode, dbo.QMS.QMSSerial, dbo.QMS.model, dbo.QMS.controlType, dbo.QMS.connectionType, dbo.QMS.generateType,
                         dbo.QMS.isCamera, dbo.QMS.centralMonitorRowCount, dbo.QMS.TV_LCD, dbo.QMS.callNumber, dbo.QMS.monitorNumber, dbo.QMS.centralMonitorNumber, dbo.QMS.description, dbo.QMS.lastUsedBranchCode,
                         dbo.QMS.lastUsedCompanyCode, dbo.QMS.warrantyStartDate, dbo.QMS.warrantyEndDate, dbo.QMS.warrantyType, dbo.QMS.lastCheckDate, dbo.QMS.isActive, dbo.Branch.name AS BranchName,
@Elahe i think u should keep that word Distinct in ur query and remove all group by fields.
SELECT
                         dbo.QMS.QMSCode, dbo.QMS.QMSSerial, dbo.QMS.model, dbo.QMS.controlType, dbo.QMS.connectionType, dbo.QMS.generateType,
                         dbo.QMS.isCamera, dbo.QMS.centralMonitorRowCount, dbo.QMS.TV_LCD, dbo.QMS.callNumber, dbo.QMS.monitorNumber, dbo.QMS.centralMonitorNumber, dbo.QMS.description, dbo.QMS.lastUsedBranchCode,
                         dbo.QMS.lastUsedCompanyCode, dbo.QMS.warrantyStartDate, dbo.QMS.warrantyEndDate, dbo.QMS.warrantyType, dbo.QMS.lastCheckDate, dbo.QMS.isActive, dbo.Branch.name AS BranchName,
but I dont think so ...
Column 'dbo.QMS.QMSCode' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
yeah but, it can be possible by using "DISTINCT" keyword then why we should group all the fields
there are other use of Group By which we don't need here.
maybe
it cab be faster than group by
10:22
yeah
M J
M J
@Elahe hey i thought you have only 4 Columns in your table but it contains more?
yeah
M J
M J
@Elahe Could you show your Full Question once here/
I want to fix this query:
SELECT
                         dbo.QMS.QMSCode, dbo.QMS.QMSSerial, dbo.QMS.model, dbo.QMS.controlType, dbo.QMS.connectionType, dbo.QMS.generateType,
                         dbo.QMS.isCamera, dbo.QMS.centralMonitorRowCount, dbo.QMS.TV_LCD, dbo.QMS.callNumber, dbo.QMS.monitorNumber, dbo.QMS.centralMonitorNumber, dbo.QMS.description, dbo.QMS.lastUsedBranchCode,
                         dbo.QMS.lastUsedCompanyCode, dbo.QMS.warrantyStartDate, dbo.QMS.warrantyEndDate, dbo.QMS.warrantyType, dbo.QMS.lastCheckDate, dbo.QMS.isActive, dbo.Branch.name AS BranchName,
it makes this error:
Column 'dbo.QMS.QMSCode' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
CROSS JOIN dbo.DefectReport
remove this @Elahe
don't need it
10:28
ok
it didnt change
what is happening with that query?
giving any error?
or incorrect result?
it gives me error
last error...
Column 'dbo.QMS.QMSCode' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
@Ghost its because she wrote this >>
(Case When ((Select Count(QMSCode) From DefectReport D Where D.productCode=QMS.QMSCode AND D.Done=0)>0) Then Cast(0 As bit) Else Cast(1 As Bit) END) As DefectDone,
(Case When ((Select Count(QMSCode) From [Order] O Where O.productCode=QMS.QMSCode AND O.Done=0) > 0) Then Cast(0 As bit) Else Cast(1 As Bit) END)
yeah but, it is require
yeah
when I remove the second case, it be okey
10:31
but, this error seems like group by syntax error
So why she required a group by?
what should be desire output?
@Ghost @Elahe
I need new column like DefectDone for my Order Table
but why u want group by?
bcz it makes error
if i dont group by
so my solution does not works for u?
10:36
what was ur solution?
grouping?
ok i have removed some joining which are not needed
SELECT
                         dbo.QMS.QMSCode, dbo.QMS.QMSSerial, dbo.QMS.model, dbo.QMS.controlType, dbo.QMS.connectionType, dbo.QMS.generateType,
                         dbo.QMS.isCamera, dbo.QMS.centralMonitorRowCount, dbo.QMS.TV_LCD, dbo.QMS.callNumber, dbo.QMS.monitorNumber, dbo.QMS.centralMonitorNumber, dbo.QMS.description, dbo.QMS.lastUsedBranchCode,
                         dbo.QMS.lastUsedCompanyCode, dbo.QMS.warrantyStartDate, dbo.QMS.warrantyEndDate, dbo.QMS.warrantyType, dbo.QMS.lastCheckDate, dbo.QMS.isActive, dbo.Branch.name AS BranchName,
@Elahe
ok
wait @Elahe
it didnt change
again that errror
Add Distinct keyword
10:39
@Elahe is nimesh there?
no...
dont call him again @TheDictator
I dont want to insistence him
it seems like horrible to ask that can i get a sample db of urs?
@Elahe what?
what happen?
ok @ghost
ask him @TheDictator
@Elahe how? he is online now
10:43
are...
ok...
are ?? means?
yes?
are meas No
no it was typo mistake
@ghost actually my boss is comming, I'll send u my sample later
are means yes in persian
ohh...
10:49
@TheDictator he is not online...
@Elahe i am seeing his window from my table
@TheDictator
@Elahe might be he is watching u then
I dont think so...
@Elahe ok
03:00 - 11:0011:00 - 15:00

« first day (95 days earlier)      last day (97 days later) »