2,935 Topics

Member Avatar for
Member Avatar for aishapot
Member Avatar for coolbeanbob

Hello, I am working through an SQL Server 2008 book. I am to the query section. I have copied the query below, word for word (I believe), but the system is showing a problem at line 10. This is the first query I have tried to create. I don't see …

Member Avatar for BitBlt
0
156
Member Avatar for elexender

Hi all, Im running a update query like this to update multiple rows(about 1000). Example of query: [CODE]UPDATE DATA1 SET Column = CASE WHEN TIME = 0 THEN X WHEN TIME = 1 THEN y WHEN TIME = 2 THEN Z WHEN Time = 3 THEN Q END [/CODE] The …

Member Avatar for elexender
0
184
Member Avatar for jacksantho

Hi, Please help me out to get this issue solve. Am don't know, how to get the output. This is the way, i need. But i don't know. (a)select distinct empid from emptable where year=2011 order by empid (b)I needs to pass this empid with the while loop: while() { …

Member Avatar for Tess James
0
219
Member Avatar for moone009

How can I replace only "North" in this following string when it is by itself? 'E NORTHCREST DR NORTH' UPDATE address SET streetname = REPLACE(streetname, ' NORTH',' N') This script changes it to 'E NCREST DR N'

Member Avatar for adam_k
0
230
Member Avatar for M.Waqas Aslam

hello! i am working on a Asp.net project using C#, now i want to connect mssql server 2008 using JS or AJAX , i am very new with JS so i have no idea where to start .can anyone help me in this . Regards M.Waqas Aslam

Member Avatar for stbuchok
0
198
Member Avatar for weblion

declare @suppid as varchar(50) if(@suppid is null) begin select isnull(MAX(convert(int,suppid)),0)+1 from us.dbo.supp where ISNUMERIC (suppid)=1 end

Member Avatar for Eagletalon
-2
45
Member Avatar for kikiritce

Cannot connect to x. =================================== A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 …

Member Avatar for Eagletalon
0
186
Member Avatar for jovillanuev

[CODE]Hi Forumer's kindly please optimize my query. I need to separate the colums for statusissue = 0 and statusissue =1 my query create double entry. ]--Sample Table Create Table #Table1 (Itemid nvarchar(10), Datephysical datetime, Statusissue int, Qty numeric(28,12)) --Sanple Data Insert into #table1 (Itemid, Datephysical, Statusissue, Qty) values ('HTC1175','2012-02-14',1,50) Insert …

Member Avatar for Tess James
0
141
Member Avatar for kolibrizas

[CODE]SqlCommand command = new SqlCommand("SELECT Id FROM users WHERE Username=@Username AND Password=HASHBYTES('MD5', @Password)"); command.Parameters.AddWithValue("@Username", pieces[1]); command.Parameters.AddWithValue("@Password", pieces[2]);[/CODE] doesn't return correct result [CODE]SqlCommand command = new SqlCommand("SELECT Id FROM users WHERE Username=@Username AND Password=@Password"); command.Parameters.AddWithValue("@Username", pieces[1]); command.Parameters.AddWithValue("@Password", pieces[2]);[/CODE] returns correct result, however the data in mssql database has to be not …

Member Avatar for kolibrizas
0
182
Member Avatar for cVz

Hi , I have 2 columns named 1. Tel_H 2. Tel_H_Code How can i merge these two columns to make them one ?? I am clueless here...The best i can do is to view them as one [code] SELECT Tel_H_Code + Tel_H AS 'Tel_H' FROM Detailed_List [/code]

Member Avatar for Todster
0
207
Member Avatar for fawadkhalil

Hi Its in fact easy to handle special characters like "%" in query, with just a bit of research one can found solution for this. Today when i checked events for my server i found that one error message and that was because a user searched for " l'atelier " …

Member Avatar for adam_k
0
143
Member Avatar for jovillanuev

Hi Forumer's, I have 3 tables, my objective is to compare the returndate from receiptdate and trandate and get the most recent receiptdate or trandate based on returndate. [CODE] Create Table #USPRODUCT (ESN Nvarchar(35), returndate datetime) Insert Into #USPRODUCT (ESN, returndate) Values ('268435458805382753','2011-04-21') Insert Into #USPRODUCT (ESN, returndate) Values ('268435458805382753','2011-08-08') …

Member Avatar for jovillanuev
0
162
Member Avatar for cyberdaemon

Good day, I want to delete a record from a single table but some of the filed on sigle record is related to other table on my database. how would i delete it.. i used this script delete from faculty deptid = (select deptCode from dept) all i want is …

Member Avatar for cyberdaemon
0
126
Member Avatar for smeboyds

I have a database that continually receives information from outside sources. I then use SQL code to take this data and move to different databases based on the information received. As it stands right now, if I receive a '1', '2', '3', from an outside source, we manually move it. …

Member Avatar for Cruize_Invades
0
102
Member Avatar for M.Waqas Aslam

hello ! i have experience in VB.net,C# and MSSQL2000,2005,2008r2 .but today my boss assign me a task to connect mssql server 2008 by using JS or JSON ,both are unknown for me ,:( i dont have any knowledge about JSON and JS , can any one help me how to …

Member Avatar for darkagn
0
236
Member Avatar for jovillanuev

[CODE]IF OBJECT_ID('tempdb..#Table', 'U') IS NOT NULL DROP TABLE #Table GO Create Table #Table ( CorrectionDate datetime, Origdesc nvarchar(50), Newdesc nvarchar(50), Total int ) Insert Into #Table (CorrectionDate, Origdesc,Newdesc,Total) Values ('2011-08-01 00:00:00.000','RMAWAR','NTF',193) Insert Into #Table (CorrectionDate, Origdesc,Newdesc,Total) Values ('2011-08-01 00:00:00.000','NTF','RMAWAR',108) Insert Into #Table (CorrectionDate, Origdesc,Newdesc,Total) Values ('2011-08-01 00:00:00.000','RMAWAR','Sub Abuse',86) Insert Into …

Member Avatar for adam_k
0
91
Member Avatar for jovillanuev

Hi Forumer's Kindly give me some Benefits to the company for taking SSAS training. I need 3 more...Thanks... JOV

0
83
Member Avatar for preeti anand
Member Avatar for rch1231
0
69
Member Avatar for Bheeman89

Hello Friends. Im having a problem in identifying the Provider for my MSSQL Server 2008. Can anyone address me the location of this information because I have to initialize it in my VB.et. As I understand for Ms Access it is something like [CODE]"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="[/CODE] Can I know where to …

Member Avatar for Jx_Man
0
272
Member Avatar for M.Waqas Aslam

hello EveryOne! i am very new in JS and JSON , or you can say this is my first day to learn something about JS and JSON, i have few questions 1- what is difference between JS and JSON. 2-My Task is to connect MSSQL server 2008 and show records …

Member Avatar for M.Waqas Aslam
0
140
Member Avatar for srinidelite

HI I would Like to Know how can Display the error Message When Executing the SP .. and the Stored Procedure doesn't having any value to Fire the Event .. [CODE] set ANSI_NULLS ON set QUOTED_IDENTIFIER ON go -- ============================================= -- Author: <sabari,,Name> -- Create date: <Create Date,,> -- Description: …

Member Avatar for ckchaudhary
0
566
Member Avatar for jcarbillon

My table has these info T123 T153 T174 Basic SQL count works fine which results to (3).. but when I use this function needed for my query the output is 4. [CODE] COUNT(DISTINCT CASE WHEN id LIKE '%T%' THEN RIGHT(ID, 3) ELSE 0 END) AS Count [/CODE] what's wrong with …

Member Avatar for BitBlt
0
158
Member Avatar for andywyndom

I am wondering if anyone wants to try and better this code sample. Here is the request: Given a range of dates (start, end) return all rows that cross that range where the rows contain a start and end date. This appears to work. I just wonder if anyone else …

Member Avatar for andywyndom
0
196
Member Avatar for draven07

..hi...im working with a Cash Collection System using PHP and a Yii Framework.. ...but i am wondering if it is possible to connect a MSSQL Database by Yii... ..if so...then could you please help me how...

Member Avatar for pritaeas
0
74
Member Avatar for mostafa-sky

hi there i have problem with my MS SQL server some one execute unwanted update statement on huge table and make loss for my data i fix it by using available backup but, i need to know who,can i do it if there are some logs for sql statement please …

Member Avatar for mostafa-sky
0
225
Member Avatar for Bheeman89

hi friends. Im currently working in integrating GR Fingerprint SDK with vb.net application. I am using MSSQL 2008 as my database and vb.net as the front end. I have completed almost 90% of the application and im stuck in integrating this SDK with my application. It has an error such …

Member Avatar for Reverend Jim
0
630
Member Avatar for arsheena.alam

Hi, I have a table that stores records of students. Now what I want is that after a particular period of time the account of the student gets disabled automatically. Is there any time based trigger that can be hit automatically if i set the time limit for that. Or …

Member Avatar for adam_k
0
110
Member Avatar for jovillanuev

Hi guys, Need your advice. I ask my boss if i could have a training for SSAS and he replied positively, im not connected in IT we are different department but were using MS SQL and we do some analysis and reports using excel and SSRS. im helping other department …

0
88
Member Avatar for jacksantho

Hi, For the users, i grant the permissions to create a table and then i also given the permission to alter table i.e grant alter on san to user; Logging as user: Table (design mode), am getting the error: "You are not logged on as the database owner or system …

Member Avatar for arden_k
0
133

The End.