2,935 Topics

Member Avatar for
Member Avatar for Hari om
Member Avatar for Ian_7

Trying to write a CTE query where I will get the Max and Min of charge encounters. I am relatively new to the world of using 'Common Table Expression' so bear with me. When I try to parse this I get syntax error messages near keyword statements 'with ' and …

Member Avatar for MaxMaherC
0
247
Member Avatar for necrovore

Hi, I have been working on a application that used sqlserver 2008 R2. we had used filestream that was there in 2008 r2. there was a decision to move from 2008 R2 to 2012 express. Now i understand that file table is a new addition to 2012 and will do …

Member Avatar for necrovore
0
357
Member Avatar for JerrimePatient
Member Avatar for pritaeas
0
336
Member Avatar for JerrimePatient

Here's my product table. [id, name, price, description, unit] For example. I want to edit only the name and description. How can I do it in mvc?

Member Avatar for JerrimePatient
0
252
Member Avatar for olegb

SQL Gurus, help !! I have a table with 3 fields, ID, Answer_5, Answer_6. Answer_5 & Answer_6 both hold a date value, but the fields are defined as string (for other reasons). In Answer_6 it is possible to have the string of 'Now'. I am trying to do a simple …

Member Avatar for AleMonteiro
0
350
Member Avatar for Amr_Mohammad_R

I need to know how the Recursive Common Table Expression works I have a table called Project table which consists of a collection of projects some of them are parent projects and the other are child projects also the child projects may be parent for other child projects and so …

-1
102
Member Avatar for olavbundgaard

The database that I'm working for has been suddenly corrupted. Fortunately, I performed a backup on it and save to a backup tape. Therefore, I reinstalled SQL Server and I tried to restore those backup. However, it failed and I suspect that maybe the backup is corrupted too as well. …

Member Avatar for theodorrinder
-1
960
Member Avatar for Joemeister

I'm trying to do a simple a database SQL script where I simply need tocreate a database as well as 4 tables within. So far I'm getting a very annoying error that states: There is already an object named 'DEVICE_TYPE' in the database. Why, I don't know? Any help regarding …

Member Avatar for erikko
0
280
Member Avatar for Maideen

Hi I am working in weekly Newspaper company. There are 15000 subscriber, subscribed for next 3 to 4 years.Per year 52 weeks and I have to generate issue number based on week(1001......3000) for each subscriber and store into data table. I am using mssql 2012. I have written the Store …

Member Avatar for erikko
0
325
Member Avatar for Yaw_1

I have been trying fruitlessly to populate my datagridview using multiple tables from my ms access database. My code is shown below. Thanks in advance for your help. Imports System.Data.OleDb Public Class Stock_Check_Options Dim MyConnection As OleDbConnection Dim MyDataAdapter As OleDbDataAdapter Dim MyDataAdapter1 As OleDbDataAdapter Dim MyDataSet As DataSet Dim …

Member Avatar for Yaw_1
0
337
Member Avatar for rpv_sen

Hi friends, I am using MSSQL Database, it has more than 13246 reconds in a table. I am trying to display it in a table with bootstrap. But i am unable to load my datas. can any please help me how to resolve this my code is below <?php session_start(); …

Member Avatar for pritaeas
0
270
Member Avatar for Trench37716

I am calling data from my database but the result is not what I want. Below is my code: Select distinct concat(ImporterDistributor.name, '/', ID.name) as [Distributor_Importer], case when Product_Delivery.Product=1 then isnull(max(Product_Delivery.Opening),0) end as OpeningPMS, case when Product_Delivery.Product=2 then isnull(max(Product_Delivery.Opening),0) end as OpeningAGO, case when Product_Delivery.Product=3 then isnull(max(Product_Delivery.Opening),0) end as OpeningATK …

Member Avatar for Trench37716
0
200
Member Avatar for Joemeister

I am quite new to SQL but I was wondering how to achieve the following. How do I get specific values that fall in the year 2013 when the date format in the table is looking something like this: 1 94 pH 02-02-2012 11:48 AM 1200001 2 103 pH 09-06-2012 …

Member Avatar for Reverend Jim
0
171
Member Avatar for Joemeister

I want to know how to achieve the following: I want to convert a varchar to a date format but so far I'm not very successfull... My date (varchar) looks something like this: 02-02-2012 11:48 AM And I want to convert it to the following this: dd-mm-yyyy To be able …

Member Avatar for Joemeister
0
297
Member Avatar for jeffcogswell

Every year or so for the past couple of decades I've seen new products appear that claim to let you create software without having to know how to code. And every time the next one comes out, I roll my eyes, because they always fail to deliver as promised. Usually …

Member Avatar for Jerry_10
0
633
Member Avatar for jean_5

I have the following view: ALTER VIEW [dbo].[vw_RelInclusaoGeralCivil] AS SELECT DISTINCT m.Nome AS MunicipioNome, au.Nome UsuarioNome, s.TipoId AS SolicitacaoTipoId FROM Solicitacao s INNER JOIN Unidade u ON s.UnidadeEntregaId = u.Id INNER JOIN Endereco e ON u.EnderecoId = e.Id INNER JOIN [IBGE.Municipio] m ON e.CodMunicipio = m.CodMunicipio INNER JOIN Terminal t …

Member Avatar for bnmng
0
267
Member Avatar for jotungiya

Split pipe delimited into new columns as below : col1 col2 col3 col4 Data|7-8|5 Data 7-8 5 Data|asdsad|sad Data asdsad sad fish|c cx cx xc cc xc cx |ededededeed fish c cx cx xc cc xc cx ededededeed Data|iueroiheqroqer|ewoijewijewd5 Data iueroiheqroqer ewoijewijewd5 tune||5 tune 5 Data|| Data check http://stackoverflow.com/questions/19688863/split-pipe-delimited-into-new-columns

Member Avatar for djjeavons
0
222
Member Avatar for adam.reilly.148

I wrote a program in early 2010 that ran a command line function that pulled data from SQL Server 2005. The program worked at the time, but does not seem to work now (for various reasons, it was not used for about a 1 year). BCP "EXEC emdb..Patch2" QUERYOUT D:\shares\patch2.txt …

Member Avatar for Reverend Jim
0
92
Member Avatar for ahmedsa

Hi guys I have problem i need to make ERD relation entity between employee and allowance Employee table Name address Basic Salary Bonus Allowance table House rent Food Allowance Moving Allowance Basic Salary is monthly and fixed Bonus is monthly and fixed food allowance is monthly and fixed for married …

Member Avatar for diafol
0
262
Member Avatar for Lethugs

Hi, I originally created this query to get a result from a single select statement Its funny that it became a very long query having sets of joined table Its also maybe annoying to look for it so im trying to trim it down most of it have same joined …

Member Avatar for Lethugs
0
337
Member Avatar for rpv_sen

Hi I am having two textbox, textbox1 is having autosuggest feature. i want to display related value based on textbox1 value. can any one pls help me. i collected the code from internet **Output Example** Report Name : PHP Report Version: It has to display the Verison from the database. …

Member Avatar for rpv_sen
1
460
Member Avatar for Niro800

Hello... Can anybody explain me Ebay or something like that database structur.Do All Item Categoris Store in One Table(with Differnt types)or do they story in many table .ex books for one table,jewellery in another table and so on.if they are store in differnt tables how do we search them ? …

Member Avatar for Traevel
0
1K
Member Avatar for djblois

I am trying to look on the web for a way to create a stored procedure that I can run and then put in multile values and this is the closest I can find: CREATE TYPE dbo.EmployeeList AS TABLE ( EmployeeID INT ); GO CREATE PROCEDURE dbo.DoSomethingWithEmployees @List AS dbo.EmployeeList …

Member Avatar for hericles
0
137
Member Avatar for jean_5

I have the following table: Region IdDescription IdUser Metropolitan Right 5 Metropolitan Left 6 Metropolitan Right 5 Metropolitan Left 6 Country Town Right 5 Country Town Left 6 Country Town Right 5 Country Town Left 6 Metropolitan Right 7 Country Town Left 8 And I want to query the kinds …

Member Avatar for Taywin
0
104
Member Avatar for Violet_82

Hi guys, I hope this is the right section to post. I need to develop an application in visual studio 2012 that uses SQL (please bear with me as I'm not very well versed in databases and SQL and therefore I don't know what SQL visual studio uses), and when …

Member Avatar for Violet_82
0
583
Member Avatar for Maideen

Hi I have an issue in store procedure. Error is Msg 4104, Level 16, State 1, Procedure W_usp_SO_Table, Line 38 The multi-part identifier "dbo.SVendorMaster.SVCode" could not be bound. Insert table is working fine. But update command is prompt the error Pls advice me Maideen Here is SP SET ANSI_NULLS ON …

Member Avatar for hiren2927
0
697
Member Avatar for Maideen

Hi I do not know how to sum the one of the column in #table temp table It is my SP SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[usp_Customer_Due_Until_Now] @Code nvarchar(30) AS BEGIN SET NOCOUNT ON; select code as Code, Name as Name, sum(Nett) SINETT into #tableSI …

Member Avatar for ExpertMind
0
2K
Member Avatar for Jesi523

Hello, I need a little help with trigger, I have been doing database development for a long time now but this is my first go around at a trigger. It is not working, can someone please look at this and let me know what I am doing wrong: ALTER TRIGGER …

Member Avatar for Dani
0
196
Member Avatar for Amr_Mohammad_R

I need to know if there is a way to improve the below function as it takes long execution time UserDefinedFunction [dbo].[GetChildrenAccount] SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER FUNCTION [dbo].[GetChildrenAccount] (@AccountID INT, @DateFrom DATETIME, @DateTo DATETIME, @TypeTransaction INT, @Currnecy INT, @Branch INT) RETURNS DECIMAL(18,3) AS BEGIN DECLARE …

0
104

The End.