بشیر
۱۲۰۲۹۶
۰۶:۴۶ ۱۳۹۴/۱۰/۰۶
لینک گروه:
https://telegram.me/joinchat/ByuUKDxUssN_QQh4Cb5MrQ
بشیر
۱۲۰۲۹۶
۰۶:۴۷ ۱۳۹۴/۱۰/۰۶

تبریک به مناسبت ارتقای گروه به Super Group
بشیر
۱۲۰۲۹۶
۰۷:۰۴ ۱۳۹۴/۱۰/۰۶
توی بحث هایی که تو گروه داشتیم تا اینجا محوریت های مطالب بیشتر ایندکس ها و performance tuning یا بهبود سرعت کوئری ها بوده. که مطالب به تدریج به انجمن هم منتقل شده تا همیشه در دسترس باشند.
حسین
۹۱۷۱۹
۰۷:۲۲ ۱۳۹۴/۱۰/۰۶
خب اینکه مشخص نیست که همه ی درسارو انتخاب کردن
حسین
۹۱۷۱۹
۰۷:۲۳ ۱۳۹۴/۱۰/۰۶
باید تمام کدهای دروس رو انتخاب کرده باشه
بشیر
۱۲۰۲۹۶
۰۷:۲۴ ۱۳۹۴/۱۰/۰۶
دیدتون کلا برنامه نویسیه ها. میتونین تحلیلی بگین چه کارهایی باید انجام بدیم؟
حسین
۹۱۷۱۹
۰۷:۲۵ ۱۳۹۴/۱۰/۰۶
خب تمام اون دانشجوهایی راselect کنه که تمام کد درس ها براش not null هست
آنیتا
۹۱۷۹۵
۰۷:۲۶ ۱۳۹۴/۱۰/۰۶
Select from stdlsn where lsnid==stdid ?
حسین
۹۱۷۱۹
۰۷:۲۸ ۱۳۹۴/۱۰/۰۶
باید ببینیم کله کد درسامون از چند تا چنده
حسین
۹۱۷۱۹
۰۷:۲۸ ۱۳۹۴/۱۰/۰۶
بعد برای اونا تو جدول اخریه بررسی کنیم؟
حسین
۹۱۷۱۹
۰۷:۳۱ ۱۳۹۴/۱۰/۰۶
Select stdid from stdlsn inner join lesson on lesson.lsid =stdlsn.lsid where ?
بشیر
۱۲۰۲۹۶
۰۷:۳۱ ۱۳۹۴/۱۰/۰۶
یه نکتش اینه که ما کل درسها رو داشته باشیم
حالا به ازای تک تک دانشجوها بررسی کنیم درس هایی که دانشجوها انتخاب کردند تعدادشون با کل درسها برابر هست یا نه/ و اونایی رو انتخاب کنیم که این شرط رو دارن
حسین
۹۱۷۱۹
۰۷:۴۰ ۱۳۹۴/۱۰/۰۶
Select stdid from stdlsn inner join lesson on lesson.lsid =stdlsn.lsid where ?
این درست نبود البته یه تیکشه
بشیر
۱۲۰۲۹۶
۰۷:۴۱ ۱۳۹۴/۱۰/۰۶
میتونین جداول رو تو اس کیو ال ایجاد کنین. بعد کوئری رو اجرا کنین. بهترین روشه
شوكت
۱۰۵۴۸۱
۰۷:۵۳ ۱۳۹۴/۱۰/۰۶
If exist (select isnname from student s inner join stdlsn sl on s.stdid=sl.stdid where
شوكت
۱۰۵۴۸۱
۰۷:۵۳ ۱۳۹۴/۱۰/۰۶
Isnname esmo famil bahame
نازیكا
۴۷۶۷۶
۰۷:۵۵ ۱۳۹۴/۱۰/۰۶
http://sqlfiddle.com/#!6/fec3b
حسین
۹۱۷۱۹
۰۷:۵۹ ۱۳۹۴/۱۰/۰۶
چطور میشه lsnid جدول lesson با stdlsn مقایسه کرد
شوكت
۱۰۵۴۸۱
۰۷:۵۹ ۱۳۹۴/۱۰/۰۶
Shartesho man motevajeh nashidam
حسین
۹۱۷۱۹
۰۸:۰۰ ۱۳۹۴/۱۰/۰۶
نه دو تا lsnid باهم مساوی باشن چطور مینویسن
شوكت
۱۰۵۴۸۱
۰۸:۰۶ ۱۳۹۴/۱۰/۰۶
If exist (select stdname from student s inner join stdlsn sl on s.stdid=sl.stdid left outer join lesson l on sl.lsnid=l.lsnid where sl.lsnid in l.lsnid)
شوكت
۱۰۵۴۸۱
۰۸:۰۷ ۱۳۹۴/۱۰/۰۶
exist (select stdname from student s inner join stdlsn sl on s.stdid=sl.stdid left outer join lesson l on sl.lsnid=l.lsnid where sl.lsnid in l.lsnid)
شوكت
۱۰۵۴۸۱
۰۸:۲۱ ۱۳۹۴/۱۰/۰۶
http://www.techonthenet.com/sql_server/exists.php
شوكت
۱۰۵۴۸۱
۰۸:۲۴ ۱۳۹۴/۱۰/۰۶
SQL SERVER: EXISTS CONDITION
This SQL Server tutorial explains how to use theEXISTS condition in SQL Server (Transact-SQL) with syntax and examples.
The SQL Server (Transact-SQL) EXISTS condition is used in combination with a subquery and is considered to be met if the subquery returns at least one row. It can be used in a SELECT, INSERT, UPDATE, or DELETE statement.
SYNTAX
The syntax for the EXISTS condition in SQL Server (Transact-SQL) is:
WHERE EXISTS ( subquery );Parameters or ArgumentssubqueryThe subquery is a SELECT statement. If the subquery returns at least one record in its result set, the EXISTS clause will evaluate to true and the EXISTS condition will be met. If the subquery does not return any records, the EXISTS clause will evaluate to false and the EXISTS condition will not be met.
NOTESQL statements that use the EXISTS condition are very inefficient since the sub-query is RE-RUN for EVERY row in the outer query's table. There are more efficient ways to write most queries, that do not use the EXISTS condition.
EXAMPLE - WITH SELECT STATEMENT
Let's look at a simple example.
The following is a SELECT statement that uses the EXISTS condition:
SELECT * FROM employees WHERE EXISTS (SELECT * FROM contacts WHERE employees.last_name = contacts.last_name AND employees.first_name = contacts.first_name);
This SQL Server EXISTS condition example will return all records from the employees table where there is at least one record in the contacts table with a matching last_name and first_name.
EXAMPLE - WITH SELECT STATEMENT USING NOT EXISTS
The SQL Server EXISTS condition can also be combined with the NOT operator.
For example,
SELECT * FROM employees WHERE NOT EXISTS (SELECT * FROM contacts WHERE employees.last_name = contacts.last_name AND employees.first_name = contacts.first_name);
This SQL Server EXISTS example will return all records from the employees table where there areno records in the contacts table for the matchinglast_name and first_name.
EXAMPLE - WITH INSERT STATEMENT
The following is an example of an INSERT statement that uses the EXISTS condition:
INSERT INTO contacts (contact_id, contact_name) SELECT supplier_id, supplier_name FROM suppliers WHERE EXISTS (SELECT * FROM orders WHERE suppliers.supplier_id = orders.supplier_id);
EXAMPLE - WITH UPDATE STATEMENT
The following is an example of an UPDATE statement that uses the EXISTS condition:
UPDATE suppliers SET supplier_name = (SELECT customers.name FROM customers WHERE customers.customer_id = suppliers.supplier_id) WHERE EXISTS (SELECT customers.name FROM customers WHERE customers.customer_id = suppliers.supplier_id);
EXAMPLE - WITH DELETE STATEMENT
The following is an example of a DELETE statementthat uses the EXISTS condition:
DELETE FROM contacts WHERE EXISTS (SELECT * FROM employees WHERE employees.last_name = contacts.last_name);
مه داد
۴۶۹۷۶
۰۸:۲۷ ۱۳۹۴/۱۰/۰۶
چند تا راهکار داره. البته با اجازه آقای مهندس بندامیر
راهکار اول
Select s.*
From student s
Where not exist (
select *
From lesson l
Left join stdlsn sl on
L.lsnid=sl.lsnid
And sl.stdid=s.stdid
Where sl. Stdid is null)
مه داد
۴۶۹۷۶
۰۸:۳۶ ۱۳۹۴/۱۰/۰۶
راهکار دوم:
Select s.stdid,s.stdname
From student s
Inner join stdlsn sl
On sl.stdid=s.stdid
Group by s.stdid,s.stdname
Having count(*)= (
Select count(*) from lesson)
مه داد
۴۶۹۷۶
۰۸:۴۹ ۱۳۹۴/۱۰/۰۶
راهکار سوم:
Select s.stdid,s.stdname
From student s
Full join lesson l
Left join lsnstd sl on
Sl.stdid =s.stdid
And sl.lsnid=l.lsnid
Group by s.stdid,s.stdname
Having sum(case when sl.stdid is null then 1 else 0 end)=0
شوكت
۱۰۵۴۸۱
۰۹:۱۵ ۱۳۹۴/۱۰/۰۶
Select name from table where name like '%alli%'
شوكت
۱۰۵۴۸۱
۰۹:۱۶ ۱۳۹۴/۱۰/۰۶
Select name from table where name like '%alli%'
Albate performance khobi nadare age dostan rahe hale behtari daran began
كمال
۱۱۵۶۲۱
۰۹:۲۰ ۱۳۹۴/۱۰/۰۶
Select name from table where name like '%alli%'
این دستور نمیگه نام هایی که اخرشان ali است؟ مثلا محمد علی رو میاره ولی علی محمد رو نمیاره
بشیر
۱۲۰۲۹۶
۰۹:۲۰ ۱۳۹۴/۱۰/۰۶
خوب من مرحله به مرحله پیش میرم
بشیر
۱۲۰۲۹۶
۰۹:۲۱ ۱۳۹۴/۱۰/۰۶
این دستور نمیگه نام هایی که اخرشان ali است؟ مثلا محمد علی رو میاره ولی علی محمد رو نمیاره
بله. البته برای نوع nvarchar شما شرط رو به این صورت بنویسین:
where name like N '%علی %'
بشیر
۱۲۰۲۹۶
۰۹:۲۲ ۱۳۹۴/۱۰/۰۶
خوب اول لازم داریم که تعداد دروس رو یه جایی نگهداری کنیم. چون تو مرحله بعدی میخوایم تعداد دروس هر دانشجو را با این تعداد مقایسه کنیم
بشیر
۱۲۰۲۹۶
۰۹:۲۶ ۱۳۹۴/۱۰/۰۶
ادر مرحله بعد تعداد دروس رو توی این متغییر میریزیم:
select @sumlesson=count(lsnid) from lesson
بشیر
۱۲۰۲۹۶
۰۹:۲۹ ۱۳۹۴/۱۰/۰۶
select stdid
from stdlsn
group by stdid
having count(lsnid)=@sumlesson
بشیر
۱۲۰۲۹۶
۰۹:۳۱ ۱۳۹۴/۱۰/۰۶
.select stdname from student
where stdid in
بشیر
۱۲۰۲۹۶
۰۹:۳۱ ۱۳۹۴/۱۰/۰۶
select stdname from student
where stdid in
(select stdid
from stdlsn
group by stdid
having count(lsnid)=@sumlesson)
بشیر
۱۲۰۲۹۶
۰۹:۳۳ ۱۳۹۴/۱۰/۰۶
declare @sumlesson int
select @sumlesson=count(lsnid) from lesson
select stdname from student
where stdid in
(select stdid
from stdlsn
group by stdid
having count(lsnid)=@sumlesson)
بشیر
۱۲۰۲۹۶
۰۹:۳۳ ۱۳۹۴/۱۰/۰۶
سلام. حالا شما اگر بخواین قسمت آخر ( انتخاب نام از Student) رو بهینش کنین چه راهکاری پیشنهاد میدین؟
مدارا
۷۷۶۷۷
۰۹:۴۳ ۱۳۹۴/۱۰/۰۶
سلام دوستان وقت بخیر
دوستان من توی نصب sql 2014 یه خطایی برام پیش میاد ممنون میشم راهنمایی کنین
این خطا رو میده:
Error installing SQL Server Database Engine Services Instance Features
Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes.
Error code: 0x851A001A
و اینکه سرویس های database engine و replication و چندتا سرویس دیگه faild میشن
شوكت
۱۰۵۴۸۱
۰۹:۴۵ ۱۳۹۴/۱۰/۰۶
سلام دوستان وقت بخیر
دوستان من توی نصب sql 2014 یه خطایی برام پیش میاد ممنون میشم راهنمایی کنین
این خطا رو میده:
Error installing SQL Server Database Engine Services Instance Features
Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes.
Error code: 0x851A001A
و اینکه سرویس های database engine و replication و چندتا سرویس دیگه faild میشن
Verjene dgee az sql server nasb hastesh roo systemetoon?
شوكت
۱۰۵۴۸۱
۰۹:۴۶ ۱۳۹۴/۱۰/۰۶
سلام دوستان وقت بخیر
دوستان من توی نصب sql 2014 یه خطایی برام پیش میاد ممنون میشم راهنمایی کنین
این خطا رو میده:
Error installing SQL Server Database Engine Services Instance Features
Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes.
Error code: 0x851A001A
و اینکه سرویس های database engine و replication و چندتا سرویس دیگه faild میشن
یه عکس هم بی زحمت بدین از قسمت ارور
بشیر
۱۲۰۲۹۶
۱۰:۱۰ ۱۳۹۴/۱۰/۰۶
سلام دوستان وقت بخیر
دوستان من توی نصب sql 2014 یه خطایی برام پیش میاد ممنون میشم راهنمایی کنین
این خطا رو میده:
Error installing SQL Server Database Engine Services Instance Features
Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes.
Error code: 0x851A001A
و اینکه سرویس های database engine و replication و چندتا سرویس دیگه faild میشن
http://dba.stackexchange.com/questions/86358/installing-sql-server-2012-wait-on-the-database-engine-recovery-handle-failed
مدارا
۷۷۶۷۷
۱۰:۱۱ ۱۳۹۴/۱۰/۰۶
http://dba.stackexchange.com/questions/86358/installing-sql-server-2012-wait-on-the-database-engine-recovery-handle-failed
اینو دیدم محسن خان ، اما مشکلم حل نشد😔
مدارا
۷۷۶۷۷
۱۰:۱۴ ۱۳۹۴/۱۰/۰۶
بله ، تعجبم اینجاس واسه سیستم دیگه نصب کردم با تنظیمات یکسان ، اون مشکلی نداشت این یکی مشکل داره
بشیر
۱۲۰۲۹۶
۱۰:۱۴ ۱۳۹۴/۱۰/۰۶
این مطلب:
Ok, after 6 hours of struggle and 'googling' I could finally get this work. The problem was due to some account name conflict. Here are the steps I followed to set it right
1) Un-installed the SQLserver
3) Re-installed it back with following changes
In the server configuration section, I changed the account name details to "NT AUTHORITY/LOCALSERVICE" (during the installation process)
Please remember to set it as "NT AUTHORITY/NETWORKSERVICE" if LOCAL SERVICE is not allowed.
مدارا
۷۷۶۷۷
۱۰:۱۴ ۱۳۹۴/۱۰/۰۶
دقیقا همین کار رو هم انجام دادم
بشیر
۱۲۰۲۹۶
۱۰:۱۶ ۱۳۹۴/۱۰/۰۶
توی موردایی که من دارم میبینم همگی اشاره به یوزری که برای استارت سرویس ست کردین دارن!!!
مدارا
۷۷۶۷۷
۱۰:۱۷ ۱۳۹۴/۱۰/۰۶
آخه هر دوتا سیستم رو از هر لحاظ یکی کردم که تست کنم
بشیر
۱۲۰۲۹۶
۱۰:۲۴ ۱۳۹۴/۱۰/۰۶
لینک گروه:
https://telegram.me/joinchat/ByuUKDxUssN_QQh4Cb5MrQ
بشیر
۱۲۰۲۹۶
۱۰:۲۶ ۱۳۹۴/۱۰/۰۶
خواهش میکنم. من هم اط شما ممنون هستم به دلیل مشارکت خوبی که تو بحث ها داشتین
بشیر
۱۲۰۲۹۶
۱۰:۳۳ ۱۳۹۴/۱۰/۰۶
I also faced the similar problem while Installing SQl server 2012 and after long searching the internet I found the solution.Uninstall the previous installations of SQL Server(including registry files and remaining files) and install again.While installing you need to change the account name for database services to NT AUTHORITYNETWORK SERVICE and it will successfully installed without any errors.
شوكت
۱۰۵۴۸۱
۱۰:۳۴ ۱۳۹۴/۱۰/۰۶
😂😂😂😂😂 shoma y windows 8.1 ya 10 topol nasb kon az no barnamehato beriz k hamchin delchasb basheo hame chi ok bashe. Verjen win 8.1 shoma ehtemalan moshkel dare yani ehtemalan az verjenaye avalash bashe.
مدارا
۷۷۶۷۷
۱۰:۳۵ ۱۳۹۴/۱۰/۰۶
😂😂😂😂😂 shoma y windows 8.1 ya 10 topol nasb kon az no barnamehato beriz k hamchin delchasb basheo hame chi ok bashe. Verjen win 8.1 shoma ehtemalan moshkel dare yani ehtemalan az verjenaye avalash bashe.
ویندوز تاره نصب شده ، اورجینالم هست با آخرین آپدیت
شوكت
۱۰۵۴۸۱
۱۰:۳۶ ۱۳۹۴/۱۰/۰۶
ویندوز تاره نصب شده ، اورجینالم هست با آخرین آپدیت
Chon org hast sql serveram crack has ba ham jor dar nemian 😂😂
Shokhi mikonam doste aziz vali ehtemalan az dastresiaye userat hast ya inke y seri az file haye microsoft az systemet pak shode. Age winet org hast benazaram y bar reset factory bde
بشیر
۱۲۰۲۹۶
۱۰:۳۷ ۱۳۹۴/۱۰/۰۶
خوب zero جان راه حل پیشنهادیش هم تغییر account به NT AUTHORITY\NETWORK SERVICE هستش که شما میگین مشکل رو حل نکرد
مدارا
۷۷۶۷۷
۱۰:۳۸ ۱۳۹۴/۱۰/۰۶
خوب zero جان راه حل پیشنهادیش هم تغییر account به NT AUTHORITY\NETWORK SERVICE هستش که شما میگین مشکل رو حل نکرد
بله دقیقا ، تیکت زدم ببینم چی میگن
ممنون از وقتی که گذاشتین
شوكت
۱۰۵۴۸۱
۱۰:۳۹ ۱۳۹۴/۱۰/۰۶
Motmaeni usero moghe nasb avaz kardi?
شوكت
۱۰۵۴۸۱
۱۰:۴۱ ۱۳۹۴/۱۰/۰۶
Mokhlesi ishalla ok shod b ma ham etela bde