[Solved] Data mining on MySQL [closed]

SQL databases play little role in data mining. (That is, unless you consider computing various business reports involving averages as “data mining”, IMHO these should at most be called “business analytics”). The reason is that the advanced statistics performed for data mining can’t be accelerated by the database indexes. And usually, they also take much … Read more

[Solved] Show Date as dddd Mmmm d, yyyy SQL

Use the following with DateName and convert functions : select DateName( month , q.dt )+’ ‘+convert(char,day(q.dt))+’, ‘+convert(char,year(q.dt)) from ( select convert(date,’20180802′) as dt ) q; SQL Fiddle Demo With respect to your last comment make your query as : select DateName( weekday , q.dt )+’ ‘+ DateName( month , q.dt )+’ ‘+ convert(char,day(q.dt))+’, ‘+convert(char,year(q.dt)) as … Read more

[Solved] Creating stored procedure getting Incorrect syntax near the keyword ‘Declare’

The @search should be an input parameter of the stored proc, (no Declare required), and you need an As between the signature block for the stored proc and the body of the proc. Create PROCEDURE [dbo].[usp_cloud_ClientAllSearch] @Search NVARCHAR(30) As SELECT client_Name, client_Surname, client_CompanyName, clientContact_TelephoneNo, clientContact_MobileNo, clientAddress_PostalCode FROM cloud_Client c Join dbo.cloud_ClientAddresses a ON a.client_ID = … Read more

[Solved] How to display data in JOIN, and return null value? [closed]

Use LEFT JOIN: SELECT VA.COL_PERSONNEL_NUMBER, VA.COL_CLOCK_DATE, VA.P10, VA.P20, VR.NAME, VR.UNIT FROM VIEW_ABSEN VA LEFT JOIN VIEW_REPORT VR ON VA.COL_PERSONNEL_NUMBER=VR.ID AND VR.DATE=VA.COL_CLOCK_DATE WHERE VA.COL_PERSONNEL_NUMBER LIKE ‘%521663%’ AND VA.COL_CLOCK_DATE BETWEEN ‘2016-08-01’ AND ‘2016-08-05’ 1 solved How to display data in JOIN, and return null value? [closed]

[Solved] Stored procedures in SQL Server 2012 [closed]

Try using xml methods, DECLARE @xml XML, @mlt_sk VARCHAR(100)=’7,11,12′, @GroupName VARCHAR(10)=’xyz’, @delimiter VARCHAR(10)=’,’ — Converting string to XML SET @xml = Cast(( ‘<X>’ + Replace(@mlt_sk, @delimiter, ‘</X><X>’) + ‘</X>’ ) AS XML) –SELECT @xml DECLARE @YOUR_TABLE AS TABLE ( VALUE VARCHAR(100) ) ——–Use nodes() method INSERT INTO @YOUR_TABLE SELECT N.value(‘.’, ‘varchar(10)’) + ‘-‘ + @GroupName … Read more

[Solved] SQL Server with C#

Try This SqlConnection myConnection = new SqlConnection(“Data Source=Igor;Initial Catalog=Prueba;Integrated Security=True”); Edit2: For the Above Picture and for TEST_DB database the Connection String should be written as SqlConnection myConnection = new SqlConnection(“Data Source=AJMOT-PC;User ID=sa;Password=thisismypassword;Initial Catalog=TEST_DB;Integrated Security=True”); If you are using the Window authentication for sql server then you don’t need to declare the User ID=sa;Password=thisismypassword section. … Read more

[Solved] I didn’t found the database in Entity Data Model C# Visual Studio

I don’t use SQL Express very often, but it looks like your connection string is not right. In your screenshot 1 it shows DESKTOP-VN2SRQQ\SQLEXPRESS as your SQL server\instance. In screenshot 2 you have chosen (localdb)\mssqllocaldb as the server\instance. Try changing the server to DESKTOP-VN2SRQQ\SQLEXPRESS 0 solved I didn’t found the database in Entity Data Model … Read more

[Solved] Android Mobile Applications [closed]

In order to connect your android app to the server you would need to make an HTTP request that will run your server side script (php for example), query a database and return a response to android device as a JSON object. Check this detailed tutorial: http://www.androidhive.info/2012/05/how-to-connect-android-with-php-mysql/ It shows an example of how to use … Read more

[Solved] sql qry trickl puzzle

SELECT * FROM @tblA WHERE @ColA = ColA AND (@ColB = ColB) AND (@ColC = ColC) Union –Handles direct or wrong input values SELECT * FROM @tblA CPT WHERE @ColA = ColA and (EXISTS(SELECT 1 FROM @tblA WHERE @ColB=ColB) and @ColB is Not NULL and @ColB = ColB) Union –Handles direct or wrong input values … Read more

[Solved] How to join 3 and more tables in SQL?

Assuming that you have table 1, table 2 and table 3. Let´s create a simple example. table 1: employees: id, department_id, first_name, last_name, salary… table 2: departments: id, location_id, department_name… table 3: locations: id, city… department_id and location_id are foreign keys. Employees have a department_id and Departments have a location_id. You need this foreign keys … Read more

[Solved] redundant rows are then in answer

Looks like you want a GROUP BY with conditional aggregation: SELECT item_id, sum(case when from_where != ‘OPENING’ AND transaction_type=”C” then quantity end) as CREDITBAL, sum(case when from_where=”OPENING” then quantity end) as OPENBAL, sum(case when transaction_type=”D” then quantity end) as DEBITBAL FROM axi_quantity_registers group by item_id solved redundant rows are then in answer

[Solved] convert sql server file into mysql [closed]

The constraint lines in you output may define the constraints, eg: ALTER TABLE [dbo].[Message] WITH CHECK ADD CONSTRAINT [FK_Message_Message] FOREIGN KEY([OpratorID]) REFERENCES [dbo].[Oprator] ([ID]) says there is a relationship between Message and Operator ( Message.OperatorID = Operator.ID ) 0 solved convert sql server file into mysql [closed]