Problem with LIKE


That's the way I've usually done it when I have to find one identifier in a list like that in a single field. That's an argument for using a separate lookup table instead of a single field. You could also use a regular expression search but I'm not sure how that would affect performance.
Posted On: Saturday 29th of December 2012 01:24:45 AM Total Views:  54
View Complete with Replies

RELATED TOPICS OF Microsoft SQL Server PROGRAMMING LANGUAGE




Timeout Expired error while using in SELECT Query

Hi! I am using SQL Server 2000 as a backend for a dotNet application that I have created. I get an error, "[Microsoft][ODBC SQL Server Driver] Timeout expired", while using a select query. I cannot provide you the query in full as it is too long so I am providing the query in part for presenting the exact picture. The User_Id used in the query are about 1300 in number. Can some one let me know what needs to be done
VIEWS ON THIS POST

120

Posted on:

Thursday 15th November 2012
View Replies!

Help newbie with PHP MySql experience

Ok i have a few years of experience with PHP and MySql databases. in this environment my database is hosted externally on a shared system and i access it directly using PHPMyAdmin. I have no local database, all of my development and testing is done online with the actual database. Now at work i have been given a website written in ASP with a MSSql database. I am trying to figure out how to do the same things with it. i need the ability to add and remove tables and such, but i can't fine an equivalent to PHPMyAdmin. I have installed Microsoft SQL Server Management Studio Express on my local machine but i can't seem to get it to connect to my external database. is there something i am missing here What is the best way to do this
VIEWS ON THIS POST

100

Posted on:

Monday 19th November 2012
View Replies!

1.7Million rows. How to speed up query?

Hi , I am asking this question on behalf of a friend. I have little knowledge of SQL but my friend is quite knowledgeable, although this is the first time he is dealing with large database for a client. So here's the story. His client has a database containing 1.5 million books. Now he is setting up a website which will enable users to search books. Searching by ISBN is no problem as it only takes 1 second. The problem is, searching by Title takes more than 20seconds, which is unacceptable. My friend has only done smaller database and he just recently thought of implementing indexing and now looking for other ideas. Each row contains book details such as Title, Author1, Author2, Author3, Publisher, Publication Date, ISBN, etc. Can anyone who are more experienced in doing large database share with me some design ideas His client is aiming for 8seconds or less.
VIEWS ON THIS POST

170

Posted on:

Monday 19th November 2012
View Replies!

Query from text box

I am trying to get a query to return a value between the input of a text box and the option of a drop down list box.. I would like to have both ddlb's but this is proving to be too much as of yet.... anyway, here is what I have so far... Code: "SELECT * from dbo.contractBilled " & whereStmt & " OR bdate BETWEEN '" & (txtFrom) & "' AND '" & (ddlbTo) & "' order by bdate desc" As is, the code runs but no filtering takes place... if I change to txtFrom.text I get an error - object required txtFrom any ideas
VIEWS ON THIS POST

130

Posted on:

Tuesday 20th November 2012
View Replies!

Procedure

i m getting @LBasicPremium blank..even i m getting @citare=1000 and @pirate blank...i must get @LBasicPremium =1000 what's wrong create Proc stpCriticalCarePremium(@iDealNo varchar(15),@Ciplancode varchar(10),@PAPlancode varchar(10),@suminsured varchar(50),@dateofbirth varchar(50)) AS Begin -- stpCriticalCarePremium 'Deal-037386','1041','1042','500000','31' Declare @CIRate varchar(50),@PARate varchar(50),@BasicPremium varchar(50) DECLARE @LBasicPremium numeric(9,2) DECLARE @LNetPremium numeric(9,2) DECLARE @LPolicyStartDate datetime DECLARE @LDiscount numeric(16,2) DECLARE @LDiscountAmount numeric(16,2) DECLARE @LServiceTax numeric(16,2) DECLARE @LServiceTaxAmount numeric(16,2) Set @LPolicyStartDate = getDate() -- Step 1: Get CIRate rate from smpricingmaster Select @CIRate = isNull(rate,0) From project_10_om.dbo.omtbl_smpricingmaster where plancode in (@ciplancode) AND convert(numeric,@dateofbirth) >= agefrom and convert(numeric,@dateofbirth) = agefrom and convert(numeric,@dateofbirth) 0 Begin Set @LDiscountAmount = (@LBasicPremium * @LDiscount)/100 End -- Step 4: Get service tax rate from service tax master SET @LServiceTax = dbo.fnUTLGetServiceTax(@LPolicyStartDate) -- Print 'Service Tax %' + Str(@LServiceTax) -- Calculate Service Tax Ammount Set @LServiceTaxAmount = (@LBasicPremium * @LServiceTax)/100 Set @LNetPremium = @LServiceTaxAmount + (@LBasicPremium - @LDiscountAmount) -- Round The Premium Set @LNetPremium = Round(@LNetPremium,0) Declare @sqlValue Varchar(8000) -- Select @sqlValue = LTrim(@LNetPremium) + '#@!' --SELECT @sqlValue as Retval End
VIEWS ON THIS POST

35

Posted on:

Tuesday 20th November 2012
View Replies!

Windows accounts

Hi , I have two questions on the below two users. Would like to know importance and when they will be used. When does user 'NT AUTHORITY\ANONYMOUS LOGON' will be used What is the significance of this user What is the significance of $ account What is this account when it will get created How these accounts play a role in sql server
VIEWS ON THIS POST

85

Posted on:

Tuesday 20th November 2012
View Replies!

Sql to access

does anybody know if you can write the same job scheduler in access as in sql
VIEWS ON THIS POST

81

Posted on:

Tuesday 20th November 2012
View Replies!

[Request] International Shipping Company Database.

I have an assignment about analysing the Distributed Information System for a typical International Shipping Company such as Hapag-Lloyd, Sally Line UK etc. The assignment mentioned about some objects such as Ship, Container, Consignment, Port, Voyage, Client, Representative, Contract, Manifest log, also about Crane system, Crane controller, Cranes actuators, Crane sensor etc. Howerver, the relationships between them, the properties, and the working scenarios are not provided. It's hard to abstract information from such a bad specification like that. So, I have to know some legacy working system in real world before starting to analyse. I try to read some information about these companies but I felt there are too much complexity. of them don't provide any information about IT system related to them. Anyone has a sample databse (any DBMS), script or just some easy-to-understand information about such this type of company Please help me! Thank for any help!
VIEWS ON THIS POST

159

Posted on:

Tuesday 20th November 2012
View Replies!

ASP syntax error when move from Access to SQL Server

,
VIEWS ON THIS POST

202

Posted on:

Tuesday 20th November 2012
View Replies!

SQL view filtering

Hi I'm really struggling with this... I want to be able to exclude an image once it has been approved by a moderator. There are two tables, tblPictures and tblApproved. So if the moderator has approved the image the details are inserted into the table tblAprroved. The approved table is very simple, it contains only a few columns: Code: [approvedID] [numeric](18, 0) IDENTITY(1,1) NOT NULL, [pictureID] [int] NOT NULL, [OwnerID] [int] NOT NULL, [blnYesNo] [int] NULL, [approvedDate] [datetime] NULL, OwnerID would be the moderators unique ID... I can supply scripts to generate them for you if that helps. I'm using this view to display only images that the moderator is required to check, anyone know how I can sort out the SQL I want the view to only return images that need voting upon. regards Jon Code: SELECT dbo.tblPictures.PictureID, dbo.tblPictures.processState, dbo.tblApproved.OwnerID AS approvedBy FROM dbo.tblPictures LEFT OUTER JOIN dbo.tblApproved ON dbo.tblPictures.PictureID = dbo.tblApproved.pictureID GROUP BY dbo.tblPictures.PictureID, dbo.tblPictures.processState, dbo.tblApproved.OwnerID HAVING (dbo.tblPictures.processState 'approved') AND (dbo.tblApproved.OwnerID 1)
VIEWS ON THIS POST

233

Posted on:

Tuesday 20th November 2012
View Replies!

Using < In Case Statment

I have a written a Select case statement to use in a database that manipulates money values in a computed column. the statement works perfectly until I try to use the < or > operator. I am sure I am screwing up the syntax somehow so any help would be greatly appreciated. Below is my code. Code: Select [Name], [Cost], Expense = CASE Cost When < 10.00 THEN (ROUND(Cost/0.25/0.86, 0)) When > 99.00 THEN (ROUND(Cost/1.3/0.86, 0)) End From [bar].[dbo].[Winelist] If I just use Code: When 10.00 THEN (ROUND(Cost/0.25/0.86, 0)) it works fine. Any ideas
VIEWS ON THIS POST

129

Posted on:

Tuesday 20th November 2012
View Replies!

Table name created by date

I have a table that is autocreated that i need to pull information out of. The table name goes as follows table1todaysdate i.e table120082909 Is there a way for me to right a select statement for this I would want something similar to the following: SELECT * From table1GETDATE() How would i got about this
VIEWS ON THIS POST

124

Posted on:

Tuesday 20th November 2012
View Replies!

User Declared Variables

Good evening, I'm in the process of learning SQL and there are some things that are not well explained in the book I am reading. If someone could explain to me what the following code does exactly, I'd be grateful. In addition, if you know of a good resource for learning advanced SQL scripting techniques I'd agree to cracking a bottle of Rosemerta's finest with you. Code: select @some_var as some_var into some_table If that creates some_table and stores the contents of some_var within it, how would I go about extracting the contents from the table into some_var Assuming it's just one varchar column in the table.
VIEWS ON THIS POST

51

Posted on:

Tuesday 20th November 2012
View Replies!

MSSQL: dataType for description

Hi all, I need to store description about product. That could be one page long(for example: one word page). What dataType should I use in MSSQL. My company had similar project with Access. In Access they are using Memo filed. Could you please tell me what datatype should I use in MSSQL. I need your expert advice.
VIEWS ON THIS POST

211

Posted on:

Tuesday 20th November 2012
View Replies!

Check database interval?

, am a new member here, Im working on making a foruma nd all is going great, just a few thing to ask. I have built my site in asp classic and whats the best way to check a database at regular intervals It would be for the messages database and would need to execute as the user browses the site... I know javascript (interval) has some ways of doing this, but doesnt really connect with mysql. any ideas
VIEWS ON THIS POST

170

Posted on:

Tuesday 20th November 2012
View Replies!

DTS Scheduling on Remote Server??

My host company has MS SQL setup with DTS scheduling disabled due to security restrictions. Is there a way I can setup a schedule from my computer with Enterprise Manager or sometihng to automatically call a remote DTS
VIEWS ON THIS POST

51

Posted on:

Tuesday 20th November 2012
View Replies!

Using arrays in stored procedures

i want to call a stored procedure sending array of integers as parameter now in stored procedure i want to xecuute Code: select * from Products where Prod_Code IN (sent array) means "sent array" stores values i want to check in query please help
VIEWS ON THIS POST

186

Posted on:

Tuesday 20th November 2012
View Replies!

Return all data where one column is distinct

maybe someone can help... I have a database with the following headings: The database of products contains the following headings: Id, Title, Description, Manufacturer, Price Some of the products have the same title but different manufacturer. Basically, I need to return all of the data for a product directory, but only where titles are unique (the title can then be clicked to find the different manufacturers for this title). The results have to be ordered by title, and where there is more than one similar title, the results must show the product of minimum price - so that I can put "Prices start at...". Does this make sense, and can anyone help\t
VIEWS ON THIS POST

278

Posted on:

Tuesday 20th November 2012
View Replies!

Converting of char data type to smalldatetime

! I've been trying to figure this one out for a long time... I have a query that allows visitors view events by day, week or month. I keep getting the following error message: "The conversion of char data type to smalldatetime data type resulted in an out-of-range smalldatetime value." It worked beautifully before I changed the selection mode to "DayWeekMonth". Here is an excerpt of my code: Code: selectSQL = "SELECT ..... WHERE " Dim i As Integer For i = 0 To myCalendar.SelectedDates.Count - 1 selectSQL &= " tblEventCalendar.Date = '" & myCalendar.SelectedDates(i).ToString() & "' OR " Next selectSQL = Left(selectSQL, Len(selectSQL) - 4)
VIEWS ON THIS POST

108

Posted on:

Tuesday 20th November 2012
View Replies!

Loop in TSQL

is there anything that would allow me (from inside a view or stored procedure) to run a stored procedure for each individual row in a select statement for example: if "select id from table" returns id -- 1 2 3 could i do some kind of loop or whatever that would be the equivilant of exec mystoredproc @param = 1 exec mystoredproc @param = 2 exec mystoredproc @param = 3
VIEWS ON THIS POST

36

Posted on:

Tuesday 20th November 2012
View Replies!

How to pass a XML data parameter to an SQL 2005 Stored Procedure

How to pass a XML data parameter to an SQL 2005 Stored Procedure I hope to insert a xml data into an typed xml column in SQL 2005. 1. I can run the Code 1 correctly. 2. I hope that I can pass a XML data parameter to an SQL 2005 Stored Procedure, So create the Code 2. but I get the error below: XQuery [cw_bookmark.Bookmark.modify()]: Only non-document nodes can be inserted. Found "xs:string ". 3. I create the Code 3, but I get the error below: XQuery [cw_bookmark.Bookmark.modify()]: ',' or ')' expected 4. I create the Code 4, but I get the error below: XQuery: SQL type 'xml' is not supported in XQuery. //--------------------------Code 1------------------------------------- create procedure cw_InsertBookmark40 @userId varchar(80)='61809B69-4AD5-40E4-B456-D957C78DD99E', @Id varchar(80)='a6dce8fe-749c-4e38-ab2f-3d03d9711b3d', as update cw_bookmark set Bookmark.modify( 'declare namespace x="http://www.hellocw.com/onlinebookmark"; insert as first into (//x:*[@Id=sql:variable("@Id")])[1]' ) where userId=@userId //--------------------------Code 1------------------------------------- //--------------------------Code 2------------------------------------- create procedure cw_InsertBookmark41 @userId varchar(80)='61809B69-4AD5-40E4-B456-D957C78DD99E', @Id varchar(80)='a6dce8fe-749c-4e38-ab2f-3d03d9711b3d', @Insertxml varchar(80)='' as update cw_bookmark set Bookmark.modify( 'declare namespace x="http://www.hellocw.com/onlinebookmark"; insert sql:variable("@Insertxml") as first into (//x:*[@Id=sql:variable("@Id")])[1]' ) where userId=@userId //--------------------------Code 2------------------------------------- //--------------------------Code 3------------------------------------- create procedure cw_InsertBookmark41 @userId varchar(80)='61809B69-4AD5-40E4-B456-D957C78DD99E', @Id varchar(80)='a6dce8fe-749c-4e38-ab2f-3d03d9711b3d', @Insertxml varchar(80)='' as update cw_bookmark set Bookmark.modify( 'declare namespace x="http://www.hellocw.com/onlinebookmark"; insert cast(sql:variable("@Insertxml") as xml) as first into (//x:*[@Id=sql:variable("@Id")])[1]' ) where userId=@userId //--------------------------Code 3------------------------------------- //--------------------------Code 4------------------------------------- create procedure cw_InsertBookmark41 @userId varchar(80)='61809B69-4AD5-40E4-B456-D957C78DD99E', @Id varchar(80)='a6dce8fe-749c-4e38-ab2f-3d03d9711b3d', @Insertxml xml as update cw_bookmark set Bookmark.modify( 'declare namespace x="http://www.hellocw.com/onlinebookmark"; insert sql:variable("@Insertxml") as first into (//x:*[@Id=sql:variable("@Id")])[1]' ) where userId=@userId //--------------------------Code 4-------------------------------------
VIEWS ON THIS POST

121

Posted on:

Tuesday 20th November 2012
View Replies!

Please help! Sql tables & USerID

Hi ! I tried a post earlier but I think I scared away! I'm a complete newbie to Sql so please bear with me! I have created a new table on my database, but I want the UserID column from my Users table to be the same ID. I have made the necessary Primary and Foreign key implements! However when I INSERT the other elements from an ASP form, I still get an error saying "Cannot insert a Null value" in the UserID column. Does this update automatically when I insert (from ASP) the others, or do I have to set a trigger or new query\t I know it may sound stupid and simple to those in the know, but I'm baffled. Trust me I have tried all the tutorials....... I promise! Maybe I'm just missing something completely! Any help...greatly appreciated! PS My login etc all work fine.......... so I know my link up with the database is working. I can also insert other values. It's just the FK/PK issue not playing properly!
VIEWS ON THIS POST

173

Posted on:

Tuesday 20th November 2012
View Replies!

any1 knows wat is the new value?

SQLSt2 = "SELECT JOBNO,SNO,CUSTOMER,DATENO, COUNT(*) as NUMBERFROM MAIN_TA WHERE CUSTOMER = '" & customer & "'" this is my sql statment..... is my count(*) syntax correct how do i do a response.write on the number of tuples return\t can any1 enlighten me\t The search returns results. the above gives me an error that Item cannot be found in the collection corresponding to the requested name or ordinal. \t\t
VIEWS ON THIS POST

108

Posted on:

Tuesday 20th November 2012
View Replies!

sql INSERT help: how to INSERT from a variable?

i have a .html file shown below. I just want to get the value from the variable and insert that to by access database. Can you please tell me how to get the value in the variable 'nam' in dbcheck() method. i feel the problems are in the red lines highlighted below in my code. the html code: test jscript
VIEWS ON THIS POST

161

Posted on:

Tuesday 20th November 2012
View Replies!

Cannot Connect to Analysis server

Server instalation: MSFT Sql Server 2K (SP3) Analysis Server (SP1) Client instalation: Analysis Manager (MDAC 8.0) Client user is a member of group OLAP Administrator When i try to connect from client (Analysis Manager) to Analysis Server over LAN i get this message: Cannot connect to Analysis Server Network error. Can anyone help me
VIEWS ON THIS POST

170

Posted on:

Tuesday 20th November 2012
View Replies!

Counting Duplicate Rows

I need to be able to count rows that have duplicate values in a particular column and then be able to eliminate all values belonging to the duplicate set from the result returned from a statement. Anyone have any idea how to do this
VIEWS ON THIS POST

116

Posted on:

Tuesday 20th November 2012
View Replies!

DTS Package executes manually but fails as scheduled job to run

I have a DTS package which when I execute it manually, it executes perfectly. I need to schedule it and therefore had to use the scheduler which would creata a job for the package. The problem is that job. It does not execute; it fails every time. The error message is: Sql server does not exist or access is denied. I have tried to trouble-shoot by setting up an alias for the server in the client network utility for sql server. I also create a new dsn with the new alias. It still failed with the same error message. I edited the properties of the dts package to connect to the server's ip instead of it's alias or logical name. Still fails. Any ideas anyone Maria
VIEWS ON THIS POST

188

Posted on:

Tuesday 20th November 2012
View Replies!

ODBC Drivers error '80004005' [Microsoft][ODBC SQL Server Driver]Timeout expired

all, I have been using SQLServer 7.0 for a long time and have been slowly adding databases as time went on. This week I started to receive this error pretty often on some new sites we have been wokring on. Microsoft OLE DB Provider for ODBC Driverserror '80004005'[Microsoft][ODBC SQL Server Driver]Timeout expired From a little bit of looking around it sounds like there might be a setting that I might need to change, but I can not find out what it is. I would guess our server is getting many connections at the same time trying to pull information from the database. Is there a limit to how many connections there can be at any one time We are still running the following: Windows NT 4 1 Gig memory Dual Pentium 800mg Processors We have a full T1 line and I have the Server.Timeout = 240, but we receive this error alomost immediatally when going to the websites. If anyone has any ideas, please pass them along!
VIEWS ON THIS POST

223

Posted on:

Tuesday 20th November 2012
View Replies!

Info.

I want to learn MS SQL SERVER 2000. But I have no idea where to start from. Could someone plz. let me know if I can make reports and create forms in MS SQL Server. Also if you could suggest a online course and recommend me a book on MS Sql Server.
VIEWS ON THIS POST

49

Posted on:

Tuesday 20th November 2012
View Replies!

DataGrid + images??

!I'm just wondering weather the DataGrid control can include .jpg files or somethingI'd like to create a forum, very basic one, where I've got users with profiles (This far, this good), though,.. I'd like some idea on how I can make every posted message be followed or begin with the Users uploaded photo. WHould be great if anyone had any clue on howto manage such a thing..I'm using Access as a database.
VIEWS ON THIS POST

135

Posted on:

Tuesday 20th November 2012
View Replies!

Start/Stop SQL Agent...

How do I find out the service name of the SQL Agent, so I can use the batch file to start and stop the SQL Agent... When I look in the Task Manager, I see "SqlAgent.exe" on 1 machine and "SqlAgent90.exe" on another machine. So, I thought "SqlAgent" or "SqlAgent90" is the service name but it doesn't work when I type this command... "NET STOP SQLAGENT". I welcome some help...
VIEWS ON THIS POST

103

Posted on:

Tuesday 20th November 2012
View Replies!

Ideas on creating ARchive Table

I need some ideas on how to archive some of the data that I am capturing in a table. I have this table that has the following columns. KPI ID, KPiNAME, KPITYPE, WEEK1, WEEK2, WEEK3, WEEK4. My table displays last four weeks of data. What I want to do is to create a sub page for this main page where users can go and produce archive reports. Any ideas on how I can archive them to display the report.
VIEWS ON THIS POST

233

Posted on:

Tuesday 20th November 2012
View Replies!

Character lenght of Ntext column

I am trying to count the characters contained in each record of my MS SQL server table. The below example works ifr the StateName column is of varchar datatypem, but it is ntext unfortunetly. Anyone has ideas how to get the amount of characters in each row The below example works for varchar columns: [highlight="SQL"]SELECT Len(StateName) FROM State WHERE StateName is not null[/highlight]
VIEWS ON THIS POST

100

Posted on:

Tuesday 20th November 2012
View Replies!

Regarding .mdf and .ldf files.

hello everybody Can anyone tell me how to find physical location of .ldf and .mdf files using query analizer. Actually i need to take backup of my database. if i take it, the .bak file will be stored near at these ldf and mdf files. please note that this database is not in local system but it is from remote database (live server). waiting for early reply with regards sreenu
VIEWS ON THIS POST

161

Posted on:

Tuesday 20th November 2012
View Replies!

Count

I have table call patient which contain tree feilds those are name ,sex,and marital staus I want to count no of female and male according to the marital status how can I do this
VIEWS ON THIS POST

30

Posted on:

Tuesday 20th November 2012
View Replies!

Update 1 table feild with 3 values

Is it possible to update a 1 table feild with 3 different values from a dynamic asp form using 3 different inputs from a from each from feild having a different names. i.e table feild is called answer feild names from the form is select checkbox radio
VIEWS ON THIS POST

146

Posted on:

Tuesday 20th November 2012
View Replies!

query problem

hi..... i m getting error when run this query..can we form such query\t\t\t strSQL = "SELECT distinct y.company_id,y.company_name,z.location_id,z.locati on FROM appointment_detail AS x INNER JOIN company AS y ON x.company_id = y.company_id AND appointment_detail AS x INNER JOIN location_table AS Z ON x.location_id=z.location_id ORDER BY y.company_name,z.location" error//////////// Microsoft OLE DB Provider for ODBC Drivers error '80040e14' [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression ''. /sd/jobsearchasp2.asp, line 18 can any suugestion....................thanx
VIEWS ON THIS POST

208

Posted on:

Tuesday 20th November 2012
View Replies!

DTS Packages

Hi all, I'm trying to create a DTS package which imports data from an Access database into sql server 2000. I'm using the import wizard, but I want to run my own stored procedure within the package, because I need to do some very specific data transformations. So basically, I know that I can use the wizard, browse my server to select my .sql file which will do my transformations, but what I don't know is how to reference an Access database from a stored procedure which will be running in SQLServer. Any ideas How do I write a select statement in my stored procedure to get data from the access database, so that I can store it in a variable to transform it before it gets imported into the sql server table
VIEWS ON THIS POST

42

Posted on:

Tuesday 20th November 2012
View Replies!

The "undefined error"-problem

hi! i wonder why I sometimes get a message saying "undefined error on line X". The SAME script can work several times before this error turns in, but when it well has turned in there's no return.... it'll stay there.... Now my question is WHY do I get this message..The error ALWAYS occour at the line WHERE this code is written:RecSet.Open SQL, Connect, adOpenStatic, adLockOptimistic
VIEWS ON THIS POST

133

Posted on:

Wednesday 21st November 2012
View Replies!

Database backup when size exceeds certain value

I would like to do a Automated full backup of a Database when the size of the Database exceeds certain value. Is that possible if yes, could I write a T-SQL Script to do it also, after doing the backup of the database, I would want the database to be truncated, such that it only keep some of the latest records. How do I do that in T-SQL I know about Maintenance Plans can do Automated Scheduling, but its recurring is based on Date. How can this be modified such that it is based on size of the database
VIEWS ON THIS POST

133

Posted on:

Monday 26th November 2012
View Replies!

I cant view my triggers in SQL 2008

, I have a problem in viewing the triggers, I cant display the triggers like the sp in SQL Server 2008, I can create them in the script but I have to select them in the script to view them, is there any way to view them like the sp.
VIEWS ON THIS POST

173

Posted on:

Monday 26th November 2012
View Replies!

Free sqldata recovery software

Hi members thanks for the good work i need help on getting a free tool for recovering sqlserver 2000 data from an mdf file . Provide me with links to it iam completely stuck please help me
VIEWS ON THIS POST

171

Posted on:

Monday 26th November 2012
View Replies!

Efficient ways to reset lost sql sa password

Have you ever forgot or lost your SQL Server sa password Did you hava any ideals to reset your lost sa password Or choosed to reinstall MS SQL Server on your PC again I once forgot my SQL sa password and I reinstalled SQL Server at last, because I failed to find some good methods to solve the problem. What annoying and terrible experience it is! In order to avoid reinstalling SQL Server for a second time, i collect some methods and try them by myself, to reset SQL Server Password for sa account. Method 1: Reset SQL Server sa password by Windows Authentication If Builtin/Administrator is present in SQL Server, you can login with an ID which is member of Administrators group and reset sa password in SQL Server. Just do as follows: Step 1. Login into SQL server using Windows Authentication. Step 2. In Object Explorer, open Security folder, open Logins folder. Right Click on sa account and go to Properties. Step 3. Type a new SQL sa password, and confirm it. Click OK to finish. This way is easilily to reset the sql server sa or other account password, but you need to have the valid Builtin/Administrator account.
VIEWS ON THIS POST

137

Posted on:

Monday 26th November 2012
View Replies!

Is this possible?

First of all I hope I am posting this in the right area. If not please feel free to correct me. I'm a commodities trader and I am trying to link real time data from a trading program called Esignal to a Microsoft Excel spreadsheet. As it turns out there is just to much information for excel to handle. I thought I might be able to use Access to help me sort through the data. I don't think i can link Access to my trading program (Esignal) So here is my question. Can I link Excel to Access and then link Access back to Excel I hope that makes since. Lance Eller
VIEWS ON THIS POST

138

Posted on:

Monday 26th November 2012
View Replies!

Alter dynamic sp

I have 3 stored proecures which i need to modify in order to include a case statement to select the correct date and time. The first 2 i have been able to alrer fine as they use just sql, however the 3rd one uses dynamic sql and im not sure how to go about making the changes i need. Have tried few ways but get error on complie or when i try and execute. Altered Code which needs to be in dynamic one: Code: ALTER Procedure [dbo].[rsp_Letter_ServiceNA] @CONTRACT VARCHAR(3) AS DECLARE @AMFROM AS VARCHAR(5) DECLARE @AMTO AS VARCHAR(5) DECLARE @PMFROM AS VARCHAR(5) DECLARE @PMTO AS VARCHAR(5) Select @AMFROM = CONVERT(VARCHAR(5), AMFromTime, 114) From tbl_contract Where contract = @CONTRACT Select @AMTO = CONVERT(VARCHAR(5), AMToTime, 114) From tbl_contract Where contract = @CONTRACT Select @PMFROM = CONVERT(VARCHAR(5), PMFromTime, 114) From tbl_contract Where contract = @CONTRACT Select @PMTO = CONVERT(VARCHAR(5), PmToTime, 114) From tbl_contract Where contract = @CONTRACT SELECT TENANT, FIRSTLINE, TOWN, CONTRACT, DISTRICT, POSTCODE, SERVICEBOOKEDDATE, @AMFROM AS TEST, SERVICEBOOKEDTIME, CASE WHEN SERVICEBOOKEDTIME = 'AM' THEN AMTIME WHEN SERVICEBOOKEDTIME = 'PM' THEN PMTIME ELSE 'Any Time' END AS APPOINTMENTTIME FROM ( SELECT TOP 100 PERCENT * FROM CONTRACT )INSIDEQUERY The bit of code i need to alter. Everything around the (SELECT TOP 100 PERCENT * FROM CONTRACT) is what i need to include in the dynamic query below. Any suggestions about how to go about would be great.
VIEWS ON THIS POST

96

Posted on:

Monday 26th November 2012
View Replies!

Changing datatypes?

I have a field called cert# and it will only allow me to input numbers. But if I do not have a cert# to include in that field and I want to put see information or check back later, what datatype should be used to reflect on the asp page that I am working on
VIEWS ON THIS POST

181

Posted on:

Monday 26th November 2012
View Replies!

Calculate month end date

I'm trying to create code that will give the last day of the previous month. I have a Crystal Report with 9 subreports querying 9 distinct data sources and it currently uses parameters fileds for start and end date but it's getting tiresome having to manually enter them. I have cracked the start date: Code: CAST(cast(year(getdate())as varchar) + '-01-' + cast(month(getdate())-1 as varchar)+ ' 00:00:00.000' AS smalldatetime) Any ideas on the month end date
VIEWS ON THIS POST

100

Posted on:

Monday 26th November 2012
View Replies!

Insert/update/select data from excel!

hi , how can we select/insert/update data from a specific cell in the excel sheet through sql query. the query could be in stored procedure. is this task be possible in DTS.
VIEWS ON THIS POST

258

Posted on:

Monday 26th November 2012
View Replies!

Export SQL data to Excel

! Is there a quick way to export SQL data to Excel using a command that I can run in SQL Server Query Analyser I've spent at least 11 minutes reading 'Teach Yourself SQL in 10 Minutes' book to no avail.
VIEWS ON THIS POST

132

Posted on:

Monday 26th November 2012
View Replies!

Querystring

I'm trying to update one column from one table, but I need the information from other table to update it. So my querystring is like this UPDATE InventoryStockTotal, ShoppingCart SET InventoryStockTotal.dblUnitsocated = (InventoryStockTotal.dblUnitsStock + ShoppingCart.Quantity) WHERE InventoryStockTotal.strProductID = tblShoppingCart.strProductID AND ShoppingCart.strCartID = @strCartIDbut I get an error msg. "Incorrect syntax near ',' line 1.anyone can help me
VIEWS ON THIS POST

169

Posted on:

Monday 26th November 2012
View Replies!