in sql server there is a group problem statement: DENSE_RANK() OVER (ORDER BY TABLUONGNV3.HOVATEN) AS STT How to write in sql access issues in groups? I'm not writing well: (Select Count (*) FROM [TABLUONGNV3] as Temp WHERE [Temp].[MANHANVIEN] < [TABLUONGNV3].[MANHANVIEN]) + 1 AS STT SELECT (Select Count (*) FROM [TABLUONGNV3] as Temp WHERE [Temp].[MANHANVIEN] < [TABLUONGNV3].[MANHANVIEN]) + 1 AS STT, TABLUONGNV3.HOVATEN, TABNHANVIEN.IDNV, TABLUONGNV3.MACANV, TABNHANVIENCA.CANV, TABLUONGNV3.N01, TABLUONGNV3.N02, TABLUONGNV3.N03, TABLUONGNV3.N04, TABLUONGNV3.N05, TABLUONGNV3.N06, TABLUONGNV3.N07, TABLUONGNV3.N08, TABLUONGNV3.N09, TABLUONGNV3.N10, TABLUONGNV3.N11, TABLUONGNV3.N12, TABLUONGNV3.N13, TABLUONGNV3.N14, TABLUONGNV3.N15, TABLUONGNV3.N16, TABLUONGNV3.N17, TABLUONGNV3.N18, TABLUONGNV3.N19, TABLUONGNV3.N20, TABLUONGNV3.N21, TABLUONGNV3.N22, TABLUONGNV3.N23, TABLUONGNV3.N24, TABLUONGNV3.N25, TABLUONGNV3.N26, TABLUONGNV3.N27, TABLUONGNV3.N28, TABLUONGNV3.N29, TABLUONGNV3.N30, TABLUONGNV3.N31, TABNHANVIENCA.TIENMOTCA, TABLUONGNV3.TONGLUONG, TABLUONGNV3.PHAT, TABLUONGNV3.TAMUNG, TABLUONGNV3.THUCNHAN, …

Member Avatar
+0 forum 0

My data SQL Server is reported this error, How does this error fix you ? SQL Server detected a logical consistency-based I/O error: torn page (expected signature: 0xaaaaaaaa; actual signature: 0x5555aaaa). It occurred during a read of page (1:210768) in database ID 7 at offset 0x00000066ea0000 in file 'G:\Database\MyData.mdf'. Additional messages in the SQL Server error log or system event log may provide more detail. This is a severe error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for more information, see …

Member Avatar
+0 forum 0

Hi, I need help to create a relational database for shop.The database should contain a column for barcode in order to register items and also to read details of items using barcode scanner.Besides this database will contain tables for performing all operations for shopping store items what are those operations I don,t know but I need it for shopping store. Thanks.

Member Avatar
Member Avatar
+0 forum 2

I have a sp which has multiple resultset.I need to create another procedure which should execute the second resultset of 1st sp for ex SP1 gives two resultset I need to write sp2 which uses only the second resulset

Member Avatar
+0 forum 0

I have a sp which has multiple resultset.I need to create another procedure which should execute the second resultset of 1st sp for ex SP1 gives two resultset I need to write sp2 which uses only the second resulset

Member Avatar
+0 forum 0

can we able to count how many number of resultset is returned by a stored procedure? i have a sp which will result in multipe resultset. more then 6.sometime 4 sometime 6 based on the parameters. so i need to count how many resultsets are returned by the sp

Member Avatar
+0 forum 0

A long shot I know but a colleague has left, leaving behind a couple of access databases that query each other and a sql database, unfortunately one of the databases querys now takes a long time to run to the point that the excel report calling the query timeouts. is it easy for any body to see what might cause it to take so long to run or how i could possible speed it up the SQL for the query is attached below SELECT [Machine Rates].Group, [SFDC time transactions log].Machine, Calendar.FFPDATE_0 AS [Date], [SFDC time transactions log].TranTime, [SFDC time transactions …

Member Avatar
Member Avatar
+0 forum 1

Hi guys, This is my first post and so glad to start sharing the knowledge. I am using Mysql database with VB.NET and I have this code : Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim str As String = "Server=localhost;Port=3306;Database=testdb;Uid=root;Pwd=password" Using con As New MySqlConnection(str) Dim query As String = "select * from testdata where rfid_tag='" & TextBox3.Text & "' and Date_serve<= '" & Date.Now.ToString("yyyy-MM-dd ") & "' and Start_Time<= '" & Date.Now.ToString("HH:mm:ss ") & "' and End_Time>= '" & Date.Now.ToString("HH:mm:ss ") & "' or amount_serve='' " Dim cm As New MySqlCommand(query, con) con.Open() Dim rd …

Member Avatar
Member Avatar
+1 forum 2

Previously used winXP operating system running normally (very good) when switching to win7 operating system, this error, read errors from the SQL Server data, what is the error ? http://www.mediafire.com/view/4q5ux6e66ds4avb/ErrorOpenSQL.jpg/file

Member Avatar
Member Avatar
+0 forum 1

Hi to all! I'm fairly new to using High availability group and i've been having issues with storage space from my Logs drive from my primary server.. I just want to know why is my Log file not shrinking after I do backups(Full) on the primary server.. also, another question.. can I do the backup on my secondary server before shrinking my Logs on the primary? the reason I want to do this because my primary server has a database primarily used for Production(MES) and I don't want any downtime on their part.. Thanks in Advance.

Member Avatar
Member Avatar
+0 forum 4

Hi I need your help with regards on my trigger in sql server update. Want I wanted to do is to update the existing record in my database and then fire this trigger: USE [DB004] ALTER trigger [dbo].[trg_Updt_Item_Code] ON [DB004].[dbo].[RMIS_Item_Master_Ref] FOR UPDATE AS declare @trgDT as datetime declare @trgUser as varchar(20) declare @trgItemCode_new as varchar(50) declare @trgItemCode_old as varchar(50) set @trgDT = (select GETDATE()) set @trgUser = (select i.EntBy from inserted i) begin update RMIS_Item_Master_Ref set ItemCode =(select i.ItemCode FROM inserted i) where ItemCode = (select d.ItemCode FROM deleted d) end currently the output that i get is (0 row(s) …

Member Avatar
+0 forum 0

Dear Friends, i Developed a C# Project with SQL Server Database (Database is not LocalDB) and i want to create a setup file to install on client system havin windows xp 32bit. Please suggest me how to do it ?

Member Avatar
Member Avatar
+0 forum 9

Hello Dear Friends, I need some help to check avilidity of the username on Leave event of a textbox in Database SQL Server, but i cann't get. it code is bellow private void textBox6_Leave(object sender, EventArgs e) { cmd = new SqlCommand("SELECT * FROM usertab WHERE username='"+textBox6.text+"'",con); SqlDataAdapter da = new SqlDataAdapter(cmd); da.Fill(ds); int i = ds.Tables[0].Rows.Count; if (i > 0) { label21.Text = "username is already exists"; ds.Clear(); } else { label21.Text = "username is available"; } } con Connetion and DataSet=ds are defined in public section. SqlConnection con = new SqlConnection("data source=MUHAMMAD\\SQLEXPRESS; database = MMS; integrated security = …

Member Avatar
Member Avatar
+0 forum 1

I have Post code column and I want to get 60, 30 and 10% for each area code that I have, but the thing is there is a between statement which makes things a bit complicated. I need 60% from the first postcode then 30% from the second and 10% from the last postcode i.e these are the people I am trying to pull from each postcode. Here is my code below: SELECT top 50000 id ,email FROM fn_getsacilist ('knowblet,saciprofiled,govdata,tobydata',25000000,10,0) WHERE idnumber>='66' and idnumber<='98' and (postcode between 2000 and 2199 or postcode between 4000 and 4099 or postcode between 7400 …

Member Avatar
Member Avatar
+0 forum 3

Hi Guys, I need your help to create query dynamically, how to populate data value from formula in other table. Sample Below Table A ID Amount 1 50 2 40 3 50 Table B ID FormulaID VALUE X 1+2+3 Y 1-2+3 Result Expectation ID FormulaID VALUE X 1+2+3 140 Y 1-2+3 60 Thanks

Member Avatar
Member Avatar
+0 forum 1

Hi, I am trying to get the the number of rows that are populated in a SQL Server table. I am using the code below but it only counts one row everytime when I know in fact that there are 47 row in a particular table. Could someone please point out what I am doing wrong? Regards, Dim connetionString As String Dim connection As SqlConnection Dim command As SqlCommand Dim adapter As New SqlDataAdapter Dim ds As New DataSet Dim sql As String connetionString = ("SERVER=x.x.x.x;database=ITDatabase;trusted_connection=yes;") sql = ("SELECT COUNT(*)FROM ASSETINFO;") connection = New SqlConnection(connetionString) Try connection.Open() command = New …

Member Avatar
Member Avatar
+0 forum 2

I am importing data from excel into datagridview its kind of working fine. my data is like this in excel 10001 MR NEW 10002 MR OLD 10003 MR CLEAN 1MB21 MR DIRTY 1BA12 MR DIXON 1EA12 MR RYDER When I load the data all is loaded untill it gets to the Alpha numeric data 10001 MR NEW 10002 MR OLD 10003 MR CLEAN blank MR DIRTY blank MR DIXON blank MR RYDER Dim MyConnection As System.Data.OleDb.OleDbConnection Dim DtSet As System.Data.DataSet Dim MyCommand As System.Data.OleDb.OleDbDataAdapter MyConnection = New System.Data.OleDb.OleDbConnection("provider=Microsoft.Jet.OLEDB.4.0;Data Source='I:\Sales Analysis\Vecta\vecta customersmb.xls';Extended Properties=Excel 8.0;") MyCommand = New System.Data.OleDb.OleDbDataAdapter("select * from [vecta …

Member Avatar
Member Avatar
+0 forum 1

Hi, I have a filestream enabled DB and a table to store the files. Until now i used to get the path of the file that has to be saved to DB. But due to some changes this was changed and now i get a byte array. my question here is 1. Can this be done? (if yes, then how? Note: the present implementation is a stored procedure that will get the path) 2. Does this implementation have any advantages - performance wise?

Member Avatar
Member Avatar
+0 forum 2

what is the best way to save data from multiple checkboxes ?? if i have 50 , 60 checkboxes Is it reasonable to set up a column of 50 or 60 checkboxes for ┘Źsaving value for each question separately ? and presumably there are questions that have not responded what should i do ?? <div class="form-group"> <div class="form-group"> <label class="control-label"> Moderate </label> <asp:CheckBox ID="CheckBox2" runat="server" class="form-control" /> </div> <div class="form-group"> <label class="control-label"> Heavy </label> <asp:CheckBox ID="CheckBox3" runat="server" class="form-control" /> </div> <div class="form-group"> <label class="control-label"> Y </label> <asp:CheckBox ID="CheckBox4"runat="server" class="form-control" /> </div> <div class="form-group"> <label class="control-label"> N </label> <asp:CheckBox ID="CheckBox5" runat="server" …

Member Avatar
Member Avatar
+0 forum 1

I have a multicolumn listview. There are three button Add, delete and Updata. List is working fine, it add, delete and update list data. But i want to save every row inside listview when i click save button. Bellow is my XAML. <TextBox Canvas.Left="12" Canvas.Top="12" Height="23" Name="textBox1" Width="120" TextChanged="textBox1_TextChanged" KeyDown="textBox1_KeyDown" GotFocus="textBox1_GotFocus" /> <TextBox Canvas.Left="146" Canvas.Top="12" Height="23" Name="textBox2" Width="120" TextChanged="textBox2_TextChanged" GotFocus="textBox2_GotFocus" KeyDown="textBox2_KeyDown" /> <ListView Canvas.Left="12" Canvas.Top="68" Height="183" Name="listView1" Width="253" SelectionChanged="listView1_SelectionChanged" SelectionMode="Single"> <ListView.View> <GridView> <GridViewColumn Header="Col1" Width="150" DisplayMemberBinding="{Binding Col1}"></GridViewColumn> <GridViewColumn Header="Col1" Width="50" DisplayMemberBinding="{Binding Col2}"></GridViewColumn> </GridView> </ListView.View> </ListView> <Button Name="addButton" Canvas.Left="122" Canvas.Top="41" Height="21" Width="69" Click="addButton_Click" IsDefault="True">Add</Button> <Button Name="removeButton" Canvas.Left="197" Canvas.Top="41" Height="21" Width="69" Click="removeButton_Click">Remove</Button> …

Member Avatar
+0 forum 0

I'm using MS SQL 2012 - trying to LEFT JOIN 3 Pivots - but am running into issues within a query variable that I'm not sure how to debug. Each Pivot works on it's own - but the actual Joining is causing the issue. Any help is appreciated. First time using Pivot - so it may be a minor fix. Have been Googling/Trial&Error for a good day and a half without luck. [SQL Fiddle](http://sqlfiddle.com/#!6/1ff77/13) loaded with my code. Thanks in advance! :) ## The Result Columns ## ID | BaseImpact1_Actual | ... | BaseImpactN_Actual | BaseImpact1_Update | ... | BaseImpactN_Update …

Member Avatar
Member Avatar
+0 forum 1

Hi There, This comes under a few forums on DaniWeb, so I've guessed and posted it here... I have two computers, both connected to the internet and running Windows 7 (Home Premium + Professional). One is my main one, the other is one I do not use. If I installed say, SQL Server, on the old machine, is there a way of connecting them together so I can access the databases via C#? Thanks guys, *Matt*

Member Avatar
Member Avatar
+0 forum 8

Hi all , can you pls say how i able to send the email notification alert with the datas getting from Sql server 2008 using windows service . - Thanks in advance

Member Avatar
Member Avatar
+0 forum 5

i installed PHP version5.4.3 SQL server 2008 IIS7 SQLSRV version3.0 Drupal 7 SQLSTATE[42S02]: [Microsoft][SQL Server Native Client 11.0][SQL Server]Invalid object name 'watchdog'. This error occurs right after the following during Drupal 7.26 installation (shown in the error report). It hangs at the start of Install Profile: Installation tasksChoose profile(done)Choose language(done)Verify requirements(done)Set up database(done)Install profile(active)Configure siteFinished SQLSTATE[42S02]: [Microsoft][SQL Server Native Client 11.0][SQL Server]Invalid object name 'watchdog'. Any idea?

Member Avatar
Member Avatar
+0 forum 1

i have written this query to show total working time and overtime of an employee on particular date (if he has came) otherwise it doesn't show record for a person if his INTIME and TIMEOUT are empty but i don't want this now, i want if for a particular date person's INtime and OutTime are empty then put 00:00 in his intime, outtime, totalworkingtime, overtime. e.g. EmplID EmplName ShiftID intime Outtime totalworking overtime dateVisited `0000001 John S001 00:00 00:00 00:00: 00:00 2013-12-01` Query: with times as ( SELECT t1.EmplID , t3.EmplName , min(t1.RecTime) AS InTime , max(t2.RecTime) AS [TimeOut] , …

Member Avatar
Member Avatar
+0 forum 6

I have text file (attached image) i need to loop and get the values (with ellipse shape )into sql table the text file record usually started with (----)

Member Avatar
Member Avatar
+0 forum 3

i am given task to analyze and modify pre written large queries within small time, so please help me understanding it with times as ( SELECT t1.EmplID , t3.EmplName , min(t1.RecTime) AS InTime , max(t2.RecTime) AS [TimeOut] , t1.RecDate AS [DateVisited] FROM AtdRecord t1 INNER JOIN AtdRecord t2 ON t1.EmplID = t2.EmplID AND t1.RecDate = t2.RecDate AND t1.RecTime < t2.RecTime inner join HrEmployee t3 ON t3.EmplID = t1.EmplID group by t1.EmplID , t3.EmplName , t1.RecDate ) SELECT EmplID , EmplName , InTime , [TimeOut] , [DateVisited] , CASE WHEN minpart=0 THEN CAST(hourpart as nvarchar(200))+':00' ELSE CAST((hourpart-1) as nvarchar(200))+':'+ CAST(minpart as …

Member Avatar
Member Avatar
+0 forum 1

i almost spent 3 hours on EXISTS operation, used in SQL especially with subqueries, i got its purpose :) that's ok but what i don't get is that WHY TO USE IT ? e.g. couldn't understand this example: *TABLE STORES* storeName----Sales-------Txn_date *TABLE GEOGRAPHY* regionName----storeName SELECT SUM(Sales) FROM Store_Information WHERE EXISTS (SELECT * FROM Geography WHERE Region_Name = 'West');

Member Avatar
Member Avatar
+0 forum 10

we should create a program that could run through two computers and the computers should be able to access 1 database for record sharing. how can we make that? we already made the system. the problem is, how can we implement this in a networked way? thanks in advance. :)

Member Avatar
Member Avatar
+0 forum 8

I am new to vb.net Pls. Can someone help me on how do to display my data saved into sql server from form1 to datagridview in form2 with vb.net. Thanks in advance.

Member Avatar
Member Avatar
+0 forum 1

The End.