2,736 Topics

Member Avatar for
Member Avatar for lefteris.gkinis

I have a code behind in my web pages and I'm trying to write Greek characters in my SQL 2010 Tables. I write in my Tables but what I get is ????? why is that? What I have to do in my SQL in order get the Greek characters? Thank …

Member Avatar for lefteris.gkinis
0
211
Member Avatar for devendradighe

Hi, I want to create a trigger to increment value of my VisibleNo field if it gets duplicate value. My Application is my multiple users at same time . When at first suppose two users open application it gets same visible no and it saves duplicate number. I want use …

Member Avatar for devendradighe
0
174
Member Avatar for Sizwe_1

i am trying to check availability of a room i have the following code: ALTER procedure [dbo].[CheckAvailability] @checkIn datetime, @checkout datetime as Select r.RoomName, RoomNO, [Description],Location, RoomPic, Price from [Room-Type] t , Room r, Booking b where r.TypeNo= t.TypeNo AND r.RoomName Not IN( Select b.CheckinDate from Booking b where ( …

Member Avatar for ChrisHunter
0
242
Member Avatar for rpv_sen

HI Please help. how to solve this I am using the below code. insert is working fine. but i am having problem in edit session i edit page i can able to display both values from Database. If i am changing the textbox1 value i am not able to get …

0
114
Member Avatar for Santanu Das

I use SQL Server2008 R2. From yesterday, I get a problem to open it. When I try to open it by Microsoft SQL Server Management Studio an error is occurring. And I also get the same error when I call it from vb.Net2010. I am attaching here the error picture. …

Member Avatar for Santanu Das
0
169
Member Avatar for AmrMohammed

Greetings I want to optimize a SQL Query. The problem I have a database full of such Queries and I need help for optimizing those Queries the problem with the Query is that it contains dozens of CASE blocks and within those CASE blocks there are calculations the Query results …

Member Avatar for pritaeas
0
215
Member Avatar for gbhs

Hi if myTable has a column like Col 10 7 3 5 9 4 How can I select three smallest numbers? my resultset should be 3 4 5 I don't prefer the following; with myT as (select col from myTable order by col) select top(3) from myT Any better idea? …

Member Avatar for gbhs
0
245
Member Avatar for amishraa

How do I get average of the duration for multiple weeks. Currently I get something like Student Avg completion time Week Year STUDENT 1 0 1 2013 STUDENT 1 5 1 2013 What I want is Student Avg completion time Week Year STUDENT 1 2.5 1 2013 <code> select a.student,avg(a.duration) …

Member Avatar for adam_k
0
166
Member Avatar for Vb.Netter

I have a simple sql table with four columns The data types are Athlete nvarchar(30) Mydate date Mytime varchar(8) Session nvarchar(40) Sample Data **Athlete Mydate Mytime Session** Jerry 14/07/2014 00:00:32 200M Jerry 14/07/2014 00:00:31 200M Jerry 16/07/2014 00:00:59 400M Jerry 16/07/2014 00:00:57 400M Jerry 16/07/2014 00:00:58 400M Now what i …

Member Avatar for adam_k
0
190
Member Avatar for HunainHafeez

I am receiving a Code in sms like "yyyy/mm-digit" (digit increments with every message). so i want to ensure that the code sent by user is exactly in that format otherwise another action. So how ? Here is my code to check but it always execute else block, why ? …

Member Avatar for adam_k
0
188
Member Avatar for Mike Bishop

I am trying to calculate days between two dates so that I can find out if they fall in the 30 / 60 / 90 day bracket The calculation I am using is working fine ` DATEDIFF(day, dbo.TblReturnDetails.RcvdDate, { fn NOW() })` what I am trying to do now is …

Member Avatar for Mike Bishop
0
239
Member Avatar for Lethugs

Hi, I need to compare record using sql ce I have this data, can be thousand rows ID Type Date Time 02-0009 I 01/02/2014 8:00 02-0009 O 01/02/2014 18:00 02-0009 O 01/03/2014 18:00 02-0009 I 01/04/2014 8:00 02-0009 O 01/04/2014 18:00 For every date there should be a 'I' and …

Member Avatar for kgariando
0
315
Member Avatar for someoneelse

i am trying to figure out the syntax to do a SQL inner join from 2 different databases... The sameple code looks like this: select * from database1.dbo.table1 t1 join database2.dbo.table2 t2 on t1.field1 = t2.field2 but I dont know how to refernce the " database1.dbo" and "database2.dbo" parts.. can …

Member Avatar for kgariando
0
229
Member Avatar for AmrMohammed

I need to setup SQL Server Express using the command line and also make the installation unattended I tried many command lines however each one of them did not work here is the last one: Setup.exe /ADDCURRENTUSERASSQLADMIN="True" /AGTSVCACCOUNT="NT AUTHORITY\NETWORK SERVIC" /AGTSVCSTARTUPTYPE="Disabled" /ASBACKUPDIR="Backup" /ASCOLLATION="Latin1_General_CI_AS" /ASCONFIGDIR="Config" /ASDATADIR="Data" /ASLOGDIR="Log" /ASPROVIDERMSOLAP="1" /ASSVCSTARTUPTYPE="Automatic" /ASTEMPDIR="Temp" /BROWSERSVCSTARTUPTYPE="Disabled" …

Member Avatar for kgariando
0
307
Member Avatar for radiancebox

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 …

Member Avatar for kgariando
0
3K
Member Avatar for Maideen

Hi I have database in structure like below Newspaper State1 state2 state3 state4 ABC 1000 5684 5687 246 DEF 879 2547 2578 2357 But I need to the structure like below How can i change this Newspaper State copies ABC State1 1000 ABC State2 5684 ABC State3 5687 ABC State4 …

Member Avatar for kgariando
0
305
Member Avatar for Aiswarya_1

I want to make a recipe website.In that I had added the add to favourite button.If i click my favourite button the recipe which i clicked will add to favourites.I i re-click it will remove from my favourites.It is controlled by the status field in the favourites table in sql.How …

Member Avatar for kaustavbanerjee
0
199
Member Avatar for weeraa

I’m going to use main report and sub report for showing some details. Main report has InvoiceHeader Part and sub report has invoice detail part. Invoice Header and invoice detail has 2 SPs. SP_InvoiceHeader (Use for main report) ALTER PROCEDURE [dbo].[testSP1] @invnoH as varchar(20) AS BEGIN SELECT * FROM INV_HEADER …

0
167
Member Avatar for Maideen

Hi I encounter the above error message while executing import excel data into sql data table. It worked fine in Mssql 2005 x86 and MS Office 2007 x86. But currently we upgraded the system to MSSql 2012 x64 and MS Office 2010 x86. I downloaded the accessdatabaseEngine.exe for MSoffice 2010 …

Member Avatar for Hamza Saleem
0
204
Member Avatar for newbie26

hi..can somebody help me? how can i have a conditional join in my statement. i have a parameter to be passed to the SP: @pRemarks my main query: select * from MasterList if @pRemarks='ALL' then my query will be: select * from MasterList inner join tblPositionLists on tblPositionLists.Position = MasterList.Position …

Member Avatar for urtrivedi
0
172
Member Avatar for AmrMohammed

Greetings, I'm trying to setup the SQL Server 2008 Express Edition using a command line Setup.exe /QUIET="False"/QUIETSIMPLE="True" But I always got a message saying that QUIET expects a Boolean value and what I'm passing to it is a Boolean value do any one knows what I'm missing

Member Avatar for pritaeas
0
74
Member Avatar for Maideen

Hi i have issue in stored procedure converting data type Destination table dbo.Z_tbl_CirculationCopy_TEMP has numeric data type But source table Z_tbl_Import_temp have VarChar Type If I export data from source, I have error message Msg 8114, Level 16, State 5, Procedure Z_usp_IMPORT_EXCEL_UNPIVOT_1, Line 10 Error converting data type varchar to …

Member Avatar for hericles
0
1K
Member Avatar for jaspertan

Hi guys, is it possible for me to downgrade server . i tried to restore .bak file from 2008 r2 to 2005 but it has a compatibility error./ can anyone could help me on this matter. Thanks in advance .

Member Avatar for AleMonteiro
0
281
Member Avatar for Reverend Jim

In true Microsoft fashion they have made the download process so counterintuitive that your chances of getting what you want is near impossible. Fortunately someone has created a "simple" [12 step process](http://www.istartedsomething.com/20140616/the-12-step-process-to-download-microsoft-sql-server-express-2014/). For yuks, see also [here](http://www.istartedsomething.com/20121216/downloading-sql-express-2012-from-microsoft-com/). And to see how little things have improved see [Bill Gates Chews Out …

Member Avatar for Reverend Jim
1
518
Member Avatar for Danuuu

hi i need to show employee attendance based on device logins with employess various information like department,designation,device_person_id,person_id,logid etc..... joining 3 tables i.e dbo.tempdevicelogs,dbo.employee_settings,dbo.persons_profile i tried this one Select Device_Person_id,personal_id,Date1,( cASE WHEN eXISTS( SELECT Device_Person_id FROM tempDeviceLogs AT WHERE T.personal_id=AT.Device_Person_id AND T.date1=AT.logDateTime ) then 'P' Else 'A' End )as Status FROM …

Member Avatar for ChrisHunter
0
206
Member Avatar for [NOPE]FOREVER

1. What exactly is a surrogate primary key? 2. Is a surrogate primary key just a made up attribute inserted into a table by the database administrator? All I know is that you use a surrogate key when there is no primary key or the natural key may not be …

Member Avatar for hericles
0
246
Member Avatar for vish_yagnik

I Have one table in sql Date Day Start Time End Time Subject Teacher 2014-06-02 Monday 2:30 PM 04:30 PM Maths Mr.Smith 2014-06-10 Tuesday 2:30 PM 04:30 PM Science Mr.Ayar 2014-06-16 Monday 2:30 PM 04:30 PM Maths Mr.Smith 2014-06-02 Monday 3:30 PM 04:30 PM Maths Mr.Smith I want to make …

Member Avatar for diafol
0
249
Member Avatar for Lethugs

Hi, I have a data, employee attendance record with following format > 01-0002,I,4/21/2014,07:34:00 01-0002,O,4/21/2014,18:09:00 01-0002,I,4/22/2014,07:47:00 01-0002,O,4/22/2014,18:09:00 01-0002,I,4/23/2014,07:54:00 01-0002,O,4/23/2014,18:07:00 where I is in and O is out The table contains lots of records for this saves records from the start how can i search a record with no In or no …

Member Avatar for Lethugs
0
249
Member Avatar for [NOPE]FOREVER

I have 3 tables --Ticket_Lines (parent), Labour_Items (child), Part_Items (child). Table Ticket_Lines has 2 primary keys (ticket_number & ticket_line_number) I know that you cant have two seperate primary keys in one table so would this mean that ticket_number and ticket_line_number is a composite primary key? if that is correct, is …

Member Avatar for hericles
5
156
Member Avatar for Antpit

Hi I have the following code that uploads images and other files to an SQL Server DB on GoDaddy via a FileUpload Control on an aspx page. Public Function InsertData(ByVal cmd As SqlCommand) As Boolean Dim strConnString As String = System.Configuration.ConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString Dim con As New SqlConnection(strConnString) cmd.CommandType = CommandType.Text cmd.Connection …

Member Avatar for Antpit
0
351

The End.