SQL Server :: Using Functions In A Query?

Feb 19, 2011

How we use a function in a sql query.me some example of using functions in query.Please donot provide me example for using inbuilt sql aggregate functions.Please give some userdefined sql functions example in a query.

View 2 Replies

Similar Messages:

Configuration :: Unable To Run IO Functions On Web Server?

Jun 22, 2010

I have my app running on asp.net 4.0 and IIS 5.1.

I'm having problems running IO functions on my PUBLISHED website, on the server running IIS. I can run everything just fine on my own machine without any issues in debug mode.

I pinpointed the errors to some IO functions Im trying to add.


StreamWriter sw = new StreamWriter(outputfile, true);



File.Copy(sourceFile, destinationFile), true);

When I add something of this nature.. I get the generic runtime error (since I'm not sure how to make it show more specific errors at this point)

I was thinking it has something to do with a security issue. But, Im not sure where to look.

View 6 Replies

Callback Functions For Server-side Controls

Mar 27, 2012

I have an ASP.NET control (a button) in a WebApp. It has an onclick attribute:


is a C# function in the codebehind file. When the user clicks the button, SaveButton_Click() is executed.

What I would like to know is whether there's a way to set up a javascript callback junction. I know how this is done in AJAX, but I'm not sure in ASP.NET (with controls that run on the server) how (or if) this can be done.

View 3 Replies

Web Forms :: Are Server.Htmlencode,Urlencode Useless Functions!

Feb 2, 2010

For protect against XSS we should make all input from textboxes thoht Server.Htmlencode function.

1) If i let a input go thorgh Server.Htmlencode and save it in database. But what happen if i letter show this input data from database on browerser ...if database input data have <script> it will then make Xss!!!!.

2) I use Server.Htmlencode.. and the user write <b>ss<b>... (label.text = userinput.text;) and i WANT to show ss in browser. What shuld i do for make this happen ??

View 4 Replies

Web Forms :: Trigger Server Side Functions With Javascript?

Jan 26, 2010

Is there a way to run server side functions by javascript? There are two things I need to do:

1. Either emulate clicking a link/button, or calling the OnClick function directly (not OnClientClick)

2. Control the back and forward control of the wizard control by using the keyboard

View 2 Replies

Implement Ckeditor (browse Server - Upload) Functions In .net?

May 23, 2010

it's my first question to this nice site :) ... i use ckeditor.com in my asp.net web site and it have a great features but if any check the full feature example when inserting image you have two feature ( upload to server - browse server and choose image ) as shown in below image


My Questions : 1- Browse Server function integrate with another product called CKfinder .. i don't want to use it i search for such one but in asp.net and can be integrating with ckeditor ?

2- is there an example Upload image function that can save in SQL DB and can be integrated with ckeditor ?

View 1 Replies

Web Forms :: Fire Both Clientside And Server Side Functions From Button Click?

Nov 25, 2010

I'm being really thich today. Can anyone tell me why I can't fire a client side then server event from this code:



View 2 Replies

DataSource Controls :: Can't Find Query's / By Right Clicking On Database Created A Query In Server Explorer?

May 17, 2010

By right clicking on my database i created a query in server explorer. But where are this query stored can't find them back. I should aspect that their is a folder query's like there is a folder tables but this isn't the case.

View 10 Replies

SQL Server :: Sub Query In Cross Table Query To Create Statistics

Mar 2, 2011

I am trying to create statitics for game downloads and am having dificulty with a sub part of my query. the goup by command is not having the disired result and i think i have been looking at it too long to see what i am doing wrong. [Code]....

At the moment it is producing each result in many rows when only 4 rows should appear. its the download column that is doing it. needs to be sub queried or something to display total in relation to month,gameid,userid.


1 1
1 1

1 1
1 1

View 2 Replies

SQL Server :: Query Slow In Loading / Trying To Display Query Result?

Feb 1, 2011

I am trying to display this query result in an aspx page.

It is very slow in loading. Here is the query. The inner query inside the outer quesry is the problem.(Please see the underlined part in the query) - (If I remove that part it is very fast.)


top 500

--This column is the issue
,Governing_Class=( case when exists (select top 1 tqc.class_code from
t_quote_class tqc
inner join t_quote_class_premium tqcm on tqc.class_code =tqcm.
where tqc.appid=pi.appid and tqc.class_code not in('8742' ,'8810','7380')
order by tqcm.premium_amt desc
then ( select top 1 tqc.class_code from
t_quote_class tqc
inner join t_quote_class_premium tqcm on tqc.class_code =tqcm.
where tqc.appid=pi.
order by tqcm.premium_amt desc
......... From tables

View 7 Replies

Databases :: Oracle Query Convert To Sql Server Query

Sep 3, 2010

I am a biggner in SQL DB . but i started a complicated and painfull work in SQL SERVER 2008. the problem convert Oracle hierarchical query to SQL query. the query


View 1 Replies

SQL Server :: How To Copy Result Query To Another Query

Nov 4, 2010

i have tow query in one stored procedure

first query and the second one every of them return only value

i want to copy the result of tow values in a new row in new table

as i want to check on this tow values in ado.net

i want to get only this tow values as a row not first and secon query

only a row has result of first and second query results


View 3 Replies

SQL Server :: Select Second Query If First Query Returns Nothing?

Oct 14, 2010

How can I SELECT second if first SELECT returns nothing?

View 8 Replies

SQL Server :: Get All Rows From Query A That Are Not In Query B?

Dec 17, 2010

Using sql server 2005.

I have an Query A of fields that returns X number of records.

I create a Query B of same fields that returns X-80 number of records.

I want to find out the 80 records that are in Query A but are not in Query B. what is the syntax for this?

View 4 Replies

SQL Server :: Trying To Get A Query Going In SQL Server But Get Bad/ Errors In The Query?

Nov 8, 2010

Trying to get a query going in SQL server but I get bad/ errors in the query.I have a 2 tables. One is the "Project" table while the other is the "Task" table.Table structure is as follows.

Project table => ProjectID,ProjectName
Task table => TaskID, TaskName,ProjectID,Quarter, Hours

A project can have many task. The ProjectID in Task table is the foreign key which reference the project ID.What I need to do is to SUM all the hours in the Task table and group it by quarter and then group it by ProjectID. Output of the SQL should be in the form of projectID,Quarter, Hours.

View 2 Replies

SQL Server :: Import Data From One Server To Another Server Through Sql Query?

Jan 22, 2011

I want to transfer the data from one server to another by sql query. I want query. I dont know how to write?

View 2 Replies

SQL Server :: Linked Server Query / Error Authentication Failed

Dec 15, 2010

I have the following query that uses a linked server that is on a different VLAN of our network:


It works fine in Query Analyzer but when I put it into Visual Web Developer 2008 Express as a SQL Data Source I get an error:

"OLE DB Provider 'MSDASQL' reported an error. Authentication failed."

View 16 Replies

SQL Server :: How To Terminate A SQL Server Query Within A VB Application

Jul 19, 2010

In order to terminate a SQL Server query within a VB application, we use the Dispose method to close and dispose the database connection. That has been the only way we have found to actually stop a query from running and release the resources.

However, the next time a new connection is created to the same database, we are getting the error "'ObjectDisposedException - Safe Handle has been closed.". It seems like it is always trying to reuse the disposed connection from the connection pool, and it is not reinitializing it. By using a different connection string, we can avoid the error, since now it's not using the connection pool. But there must be a better way to either stop the query or to reinitialize the disposed connection.

View 6 Replies

SQL Server :: How To Use 'like' Query

Dec 31, 2010

is this correct:

select * from tablename where xyz like 'dan%' and like 'bill%'

i want to list entries where xyz is daniel, bill steffen.....

View 1 Replies

SQL Server :: IF ELSE With Sub Query?

Sep 4, 2010

for some reason i am always getting an incorrect syntax error in the following queryI have tried 2 ways to write this query and both failed, Query 1:


Query 2:


View 4 Replies

MVC :: Have 2 Functions One For Post One For Get?

Dec 23, 2010

it is possible to make 2 functions with the same name (and the same overload.. lets say both doesnt get anything in and return an action result)in the same controllerone for t
ne for get

View 8 Replies

Looping In SQL Server Query

Aug 4, 2010

consider the follwing table, this table actually shows which id was given a new id

i.e 11 was assigned 13

again 13 was assigned 15

15 was reassigned 17....and so on actually 11,13,15,17,19 represent the same user (hope u understood)

customerId rejoiningId

11 13

13 15

15 17

20 21

17 19

48 50

21 25
i need to loop through all the rows and find the relation that which all ids are interlinked

say the user enters the rejoining id -13,hence the result should come out to be as 11,13,15,17,19

if user enters 21result should be 20,21,25

it takes a bit of looping statements in query that i couldnt figure out

View 7 Replies

SQL Server :: How To Run Completely A Big Query

Jul 18, 2010

i have a big query and many data

when i try to execute this query i got this error

how can i run this query complete?

View 3 Replies

SQL Server Date Query?

Jan 15, 2011

I am new to development and want to know the professional way to deal with dates in SQL Server. In my applications mainly we deal with the DATE datatype and no concern with time part. Also maintaining the format dd/mm/yyyy So for example if I have the table with the following structure.

emp_id int
emp_name varchar(50)
join_date date

and if I want to query "join_date" in between start date and end date and pass the dd/mm/yyyy as stored procedure criteria and want to query.What is the professional way to handle dates? I always convert date in varchar and then do the comparison which I guess is the unprofessional way of doing it.

View 4 Replies

What's Wrong With This SQL Server Query

Jan 15, 2011

What's wrong this T-SQL query :

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim SQLData As New System.Data.SqlClient.SqlConnection("Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|Database.mdf;Integrated Security=True;User Instance=True")


View 3 Replies

Copyrights 2005-15 www.BigResource.com, All rights reserved