|
Dear reader,
I am totally new in database-programming. I have available all the standard-books but still, I feel lost in that area. I am working with Sql Server Express-Edition
One of my basic questions is: How can I test SQL-commands from any kind of tool. It seems, that the express-edition does not have all the tools installed.
Another question is: Is it ok to start programming with "basic Ado.Net" and not focussing on EF or Linq?
Best regards
modified 10-Mar-14 13:39pm.
|
|
|
|
|
|
Frygreen wrote: Another question is: Is it ok to start programming with "basic Ado.Net" and not focussing on EF or Linq?
Oh yes!
|
|
|
|
|
I will back Jorgen on this one, do NOT use EF as your data access layer if you intend to become a serious developer who builds data centric solutions. Linq to SQL is basically a disaster wrapped in obscure syntax, learn TSQL and you will reap the benefits your entire career.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Frygreen wrote: It seems, that the express-edition does not have all the tools installed.
There are different installation options for SQL Express - the larger "Express with advanced services" or "Express with tools" downloads include Management Studio, whereas the smaller "Express" download doesn't.
If you've downloaded the version without the tools, there's a separate "Management Studio"-only download available on the same page:
http://www.microsoft.com/en-gb/download/details.aspx?id=29062[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
...for the moment.... thank you for your kind replies
|
|
|
|
|
how to convert an integer to days months years
i have a number of days resulted from sum of datediff to many rows as integer
i want to convert this days into days months years
like this
pr start end days_diff
-------------------------------------------------------
237 2010-06-01 2010-11-30 182
237 2010-12-01 2011-05-31 181
237 2011-06-01 2012-05-31 365
237 2012-06-01 2013-05-31 364
237 2013-06-01 2014-05-31 364
this total a 1456 days
i want to convert this days into
4 years 0 months 1 days
when i use the regular sum for each record into days months years it creates
3 years 12 months 1 days
or any way that produce the same result even not by calculate the sum of the days difference
but produce the same result
4 years 0 months 1 days
not
3 years 12 months 1 days
thanks for help
Lost & Forgotten
|
|
|
|
|
I didn't got, how you compute the years, months and days?
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
start end
-------------------------------------------------------
2010-06-01 2010-11-30
2010-12-01 2011-05-31
2011-06-01 2012-05-31
2012-06-01 2013-05-31
2013-06-01 2014-05-31
suppose this an experience periods
i want to get total of this experience
thanks for help
Lost & Forgotten
|
|
|
|
|
OK...
Get minimum of start (select min(start) from ... where ...)
Get maximum of end (select max(end) from ... where ...)
Do datediff between the two...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
thats right in case the periods are connected some cases the periods not connected like
start end
-----------------------------
2010-06-01 2010-11-30
2011-06-01 2012-05-31
2013-06-01 2014-05-31
Lost & Forgotten
|
|
|
|
|
I see...
In that case you can do something like this
select sum(datediff(d, start,end)) from ... where ...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
How do you do the calculation? If the number of months comes out at 12 then that is 1 year.
|
|
|
|
|
start end
-------------------------------------------------------
2010-06-01 2010-11-30
2010-12-01 2011-05-31
2011-06-01 2012-05-31
2012-06-01 2013-05-31
2013-06-01 2014-05-31
suppose this an experience periods
i want to get total of this experience
thanks for help
Lost & Forgotten
|
|
|
|
|
Assuming you are storing the values as DateTime types, then you can just use a simple subtraction to get a difference value, which can be converted to years, months and days.
|
|
|
|
|
You'll need to pick a starting date, since different months have a different number of days.
For example, 30 days from 1st March would be 30 days; from 1st April, it would be one month; from 1st February 2014, it would be one month and two days; from 1st February 2012, it would be one month and one day.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hi,
I would like to ask how can I make a complete silent installation and configuration for the MySQL server.
i have downloaded the Windows (x86, 32-bit), MSI Installer and I want to make a silent installation for my setup package.
Technology News @ www.JassimRahma.com
|
|
|
|
|
First result on Google for "MySql Windows Silent Install":
For example, to perform a quiet installation (which shows no dialog boxes or progress):
msiexec /i mysql-5.1.73.msi /quiet
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
what about the configuration setting such as windows service name, port, password, etc. I mean the screen which pops up after the installation. how can I run it in a Quiet! mode?
Technology News @ www.JassimRahma.com
|
|
|
|
|
|
Thanks
Technology News @ www.JassimRahma.com
|
|
|
|
|
Just noting that if your intent is that your application will be doing all of the database administration then choosing a database that is less full featured might be a better option. And choosing an embedded database might be a better option as well.
|
|
|
|
|
I am currently running mssql 2008 SSRS on hosting server and whenever I view my report on chrome browser my report shrinks to 25% of the total page width. Please what do I need to do?
Kenny
|
|
|
|
|
|
Hi,
I am having a problem saving from my php for to MySQL database. I am not sure if the problem is at the PHP level or database level.
here is the form:
http://www.jassimrahma.com/contactme[^]
and when submiting arabic characters... it will be saved as unreadable characters like this:
http://www.jassimrahma.com/arabic.png[^]
My database character set is UTF-8 Unicode and Collation is utf8_general_ci
here is my table DDL:
CREATE TABLE `mubadara_messages` (
`message_id` int(11) NOT NULL AUTO_INCREMENT,
`message_from_name` varchar(255) DEFAULT NULL,
`message_from_email` varchar(255) DEFAULT NULL,
`message_subject` varchar(255) DEFAULT NULL,
`message_body` text,
`message_ip_address` varchar(255) DEFAULT NULL,
`created_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`message_id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
and this is my PHP:
require 'PHPMailer/class.phpmailer.php';
$message_visitor_name = $_POST['txtName'];
$message_visitor_email = $_POST['txtEmail'];
$message_subject = $_POST['txtSubject'];
$message_body = $_POST['txtMessage'];
$message_ip_address = $_SERVER['REMOTE_ADDR'];
$mysql_connection = mysql_connect('mysql.jassimrahma.com', 'jassimdb', 'Mujtaba2013');
mysql_select_db('jassimrahma_com', $mysql_connection);
$mysql_command = "INSERT INTO mubadara_messages (message_from_name, message_from_email, message_subject, message_body, message_ip_address) VALUES ('$message_visitor_name', '$message_visitor_email', '$message_subject', '$message_body', '$message_ip_address')";
$mysql_result = mysql_query($mysql_command, $mysql_connection) or die(mysql_error());
mysql_close($mysql_connection);
exit(header("Location: thankyou"));
can anyone help please
Thanks,
Jassim
Technology News @ www.JassimRahma.com
modified 6-Mar-14 5:57am.
|
|
|
|