Give All Results Even When Not Available

Oct 15, 2007

Hello I have a problem with a query..
What I want:
I have a query that selects from different tables:

Code:

SELECT * FROM table1 as t1 ,table2 as t2 WHERE t1.t2_Id = t2.Id


But now I want all results from table1 even if it's not linked with table2, if that's the case i want to add something like:

Code:

CASE
WHEN 'notlinked' THEN 1
ELSE 0
END HighLight


that way I can show the rows that have to be manually linked
hope you understand my problem...

thanks!

View 1 Replies


ADVERTISEMENT

Give Results Even If Two Tables Used Don't Match

Aug 12, 2014

I have a table of customer information (ci), but I have to link to another table in order to get the street address (sa).

If I exclude the street address I get 33 results. If I make the link to street address I will only get 30 results.

What I found is that if the ci table field for country is blank and I try linking to sa table then that result will not be shown.

Is there a way to get all 33 results while linking the two tables?

View 4 Replies View Related

DateRange Query Give Wrong Results

Sep 1, 2004

I am running some query with the following where clause

where DateCreated BETWEEN '06/01/2004' AND '06/30/2004'

It gives the records where DateCreated is of 2004-07-01 21:48:02.377

the default language on the server is British English.

Could anybody please tell me the reason why records from july are also coming

View 1 Replies View Related

Transact SQL :: Query To Give Results Of All Configured Alerts Occurring History

May 14, 2015

We created sql alerts on all our sql servers environments. Now, i want to see each sql server which sql alerts so far got fired and which one never occurs. is there any way, we can get this information from any system database?

View 9 Replies View Related

Is There A Way To Hold The Results Of A Select Query Then Operate On The Results And Changes Will Be Reflected On The Actual Data?

Apr 1, 2007

hi,  like, if i need to do delete some items with the id = 10000 then also need to update on the remaining items on the with the same idthen i will need to go through all the records to fetch the items with the same id right?  so, is there something that i can use to hold those records so that i can do the delete and update just on those records  and don't need to query twice? or is there a way to do that in one go ?thanks in advance! 

View 1 Replies View Related

SQL Server 2008 :: Elegant Way For Returning All Results When Subquery Returns No Results?

Mar 25, 2015

I have four tables: Customer (CustomerId INT, CountyId INT), County (CountyId INT), Search(SearchId INT), and SearchCriteria (SearchCriteriaId INT, SearchId INT, CountyId INT, [others not related to this]).

I want to search Customer based off of the Search record, which could have multiple SearchCriteria records. However, if there aren't any SearchCriteria records with CountyId populated for a given Search, I want it to assume to get all Customer records, regardless of CountyId.

Right now, I'm doing it this way.

DECLARE @SearchId INT = 100
SELECT * FROM Customer WHERE
CountyId IN
(
SELECT CASE WHEN EXISTS(SELECT CountyId FROM SearchCriteria WHERE SearchId = @SearchId)
THEN SearchCriteria.CountyId

[Code] .....

This works; it just seems cludgy. Is there a more elegant way to do this?

View 4 Replies View Related

Need To Display Results Of A Query, Then Use A Drop Down List To Filter The Results.

Feb 12, 2008

Hello. I currently have a website that has a table on one webpage. When a record is clicked, the primary key of that record is transfered in the query string to another page and fed into an sql statement. In this case its selecting a project on the first page, and displaying all the scripts for that project on another page. I also have an additional dropdownlist on the second page that i use to filter the scripts by an attribute called 'testdomain'. At present this works to an extent. When i click a project, i am navigated to the scripts page which is empty except for the dropdownlist. i then select a 'testdomain' from the dropdownlist and the page populates with scripts (formview) for the particular test domain. what i would like is for all the scripts to be displayed using the formview in the first instance when the user arrives at the second page. from there, they can then filter the scripts using the dropdownlist.
My current SQL statement is as follows.
SelectCommand="SELECT * FROM [TestScript] WHERE (([ProjectID] = @ProjectID) AND ([TestDomain] = @TestDomain))"
So what is happening is when testdomain = a null value, it does not select any scripts. Is there a way i can achieve the behaivour of the page as i outlined above? Any help would be appreciated.
Thanks,
James.

View 1 Replies View Related

Stored Proc Results Are Displaying In The Messages Tab Instead Of Results Tab- URGENT

May 14, 2008




Hi All,
I have a stored proc which is executing successfully...but the results of that stored proc are displaying in the Messages Tab instaed of results Tab. And in the Results Tab the results shows as 0..So, Any clue friends..it is very urgent..I am trying to call this stored proc in my Report in SSRS as well but the stored proc is not displaying there also...Please help me ASAP..

Thanks
dotnetdev1

View 4 Replies View Related

I Give Up On This One...

Jul 20, 2005

I have tried and tried to get this to work and I'm doing something dumb.I'm going to include sample data and my format file. Can someone helpme figure out my dumb mistake on a bulk insert using a format file?Don't worry about data types, I'll handle that later. Thanks a lot!!!CSV File:ID,NAME,SPEC_ORIGINAL,SPEC,CATEGORY,ADDRESS1,CITY, STATE,ZIP,PHONE,COMPETITOR,PLAN,HARVESTDATE,EIDs,EIDCount,sourceIds,minS core,maxScore,hasContract,matchFilter,matchFilterBGR,matchFilterCAS,matc hFilterMTV,forceMatch,forceMatchUserId,paymentPlatforms,matchStatusColor ,recordId,dupId,NetworkComparedTo1,name1,Family Practice General Practice,FP,PCP,address1,DeerfieldBeach,FL,33442,phone1,C1,PPO,5/15/2004,1000067851,2,BADG_0874992,9,14.4,Y,Y,Y,Y,Y,0,,3,G,1, ,netcomp12,name2,Family Practice GeneralPractice,FP,PCP,address2,Margate,FL,33063,phone2,C 2,PPO,5/15/2004,1000067851,2,BADG_0874992,9,10,Y,Y,Y,Y,Y,0,,3,G,2, ,netcomp23,name3,General Practice,GP,PCP,address3,DeerfieldBeach,FL,33442,phone3,C3,PPO,5/15/2004,1000067851,2,BADG_0874992(14.4Y)|BADG_1901859,9,14.4,Y,Y,Y,Y,Y,0,,3,G,3, ,netcomp34,name4,ReproductiveEndocrinology,OBEN,OB,address4,Davie,FL,33328,phon e4,C4,PPO,5/15/2004,1000083687,1,CAS_650410436,10.3,10.3,Y,N,N,N,N,0,,0, Y,4, ,netcomp4Format File:8.0311 SQLCHAR 0 1 "
" 0 quote Latin1_General_CI_AS2 SQLCHAR 0 3000 "," 1 Provider_Raw_ID Latin1_General_CI_AS3 SQLCHAR 0 3000 "," 0 none_name Latin1_General_CI_AS4 SQLCHAR 0 3000 "," 0 none_Spec_orig Latin1_General_CI_AS5 SQLCHAR 0 3000 "," 3 SpecialtyCode Latin1_General_CI_AS6 SQLCHAR 0 3000 "," 2 Category Latin1_General_CI_AS7 SQLCHAR 0 3000 "," 0 none_Address Latin1_General_CI_AS8 SQLCHAR 0 3000 "," 0 none_City Latin1_General_CI_AS9 SQLCHAR 0 3000 "," 0 none_State Latin1_General_CI_AS10 SQLCHAR 0 3000 "," 0 none_Zip Latin1_General_CI_AS11 SQLCHAR 0 3000 "," 0 none_Phone Latin1_General_CI_AS12 SQLCHAR 0 3000 "," 0 none_Competitor Latin1_General_CI_AS13 SQLCHAR 0 3000 "," 0 none_Plan Latin1_General_CI_AS14 SQLCHAR 0 3000 "," 0 none_HarvestDate Latin1_General_CI_AS15 SQLCHAR 0 3000 "," 0 none_EIDs Latin1_General_CI_AS16 SQLCHAR 0 3000 "," 5 EIDCount Latin1_General_CI_AS17 SQLCHAR 0 3000 "," 0 SourceIds Latin1_General_CI_AS18 SQLCHAR 0 3000 "," 6 minScore Latin1_General_CI_AS19 SQLCHAR 0 3000 "," 7 maxScore Latin1_General_CI_AS20 SQLCHAR 0 3000 "," 8 hasContract Latin1_General_CI_AS21 SQLCHAR 0 3000 "," 9 matchFilter Latin1_General_CI_AS22 SQLCHAR 0 3000 "," 10 matchFilterBGR Latin1_General_CI_AS23 SQLCHAR 0 3000 "," 11 matchFilterCAS Latin1_General_CI_AS24 SQLCHAR 0 3000 "," 12 matchFilterMTV Latin1_General_CI_AS25 SQLCHAR 0 3000 "," 13 forceMatch Latin1_General_CI_AS26 SQLCHAR 0 3000 "," 14 forceMatchUserId Latin1_General_CI_AS27 SQLCHAR 0 3000 "," 15 paymentPlatforms Latin1_General_CI_AS28 SQLCHAR 0 3000 "," 16 matchStatusColor Latin1_General_CI_AS29 SQLCHAR 0 3000 "," 17 recordId Latin1_General_CI_AS30 SQLCHAR 0 3000 "," 18 dupId Latin1_General_CI_AS31 SQLCHAR 0 3000 "," 4 NetworkComparedTo Latin1_General_CI_ASHere's a script for the table!if exists (select * from dbo.sysobjects where id =object_id(N'[dbo].[Provider_Results]') and OBJECTPROPERTY(id,N'IsUserTable') = 1)drop table [dbo].[Provider_Results]GOCREATE TABLE [dbo].[Provider_Results] ([Provider_Raw_ID] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_ASNULL ,[Category] [varchar] (3000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,[SpecialtyCode] [varchar] (3000) COLLATE SQL_Latin1_General_CP1_CI_ASNULL ,[NetworkComparedTo] [varchar] (3000) COLLATESQL_Latin1_General_CP1_CI_AS NULL ,[EIDCount] [varchar] (3000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,[minScore] [varchar] (3000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,[maxScore] [varchar] (3000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,[hasContract] [varchar] (3000) COLLATE SQL_Latin1_General_CP1_CI_ASNULL ,[matchFilter] [varchar] (3000) COLLATE SQL_Latin1_General_CP1_CI_ASNULL ,[matchFilterBGR] [varchar] (3000) COLLATE SQL_Latin1_General_CP1_CI_ASNULL ,[matchFilterCAS] [varchar] (3000) COLLATE SQL_Latin1_General_CP1_CI_ASNULL ,[matchFilterMTV] [varchar] (3000) COLLATE SQL_Latin1_General_CP1_CI_ASNULL ,[forceMatch] [varchar] (3000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,[forceMatchUserId] [varchar] (3000) COLLATESQL_Latin1_General_CP1_CI_AS NULL ,[paymentPlatforms] [varchar] (3000) COLLATESQL_Latin1_General_CP1_CI_AS NULL ,[matchStatusColor] [varchar] (3000) COLLATESQL_Latin1_General_CP1_CI_AS NULL ,[recordId] [varchar] (3000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,[dupId] [varchar] (3000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL) ON [PRIMARY]GOThanks again. I am dying on this one. With everything includedhopefully someone (smarter than me) can figure it out.Thanks,Andrew*** Sent via Devdex http://www.devdex.com ***Don't just participate in USENET...get rewarded for it!

View 2 Replies View Related

Nu Ger Jag Upp (I Give Up)

Feb 5, 2008



Jag har installerat sql server 2008 (I have installed sql server)

I cannot find enterprise manager - I think that the sql server is useless unless there is a manager.

View 1 Replies View Related

Mind-boggling Gridview Results! Different Results For Different Teams..

Jun 18, 2008

Hi all, I have the following SQLDataSource statement which connects to my Gridview:<asp:SqlDataSource ID="SqlDataSourceStandings" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"  SelectCommand="SELECT P.firstName, P.lastName, T.teamName, IsNull(P.gamesPlayed, 0) as gamesPlayed, IsNull(P.plateAppearances,0) as plateAppearances, IsNull( (P.plateAppearances - (P.sacrifices + P.walks)) ,0) as atbats, IsNull(P.hits,0) as hits, P.hits/(CONVERT(Decimal(5,2), IsNull(NullIF(P.atbats, 0), 1))) AS [average], (P.hits + P.walks)/(CONVERT(Decimal(5,2), IsNull(NullIF( (P.atbats + P.sacrifices + P.walks) , 0), 1)))  AS [OBP], (P.hits - (P.doubles + P.triples + P.homeRuns) + (2 * P.doubles) + (3 * P.triples) + (4 * P.homeRuns)) / (CONVERT(Decimal(5,2), IsNull(NullIF(P.atbats, 0), 1))) AS [SLG], P.singles, P.doubles, P.triples, P.homeRuns, P.walks, P.sacrifices, P.runs, P.rbis FROM Players P INNER JOIN Teams T ON P.team = T.teamID ORDER BY P.firstName, P.lastName"></asp:SqlDataSource>There are 8 teams in the database, and somehow the average and obp results are as expected for all teams except where T.teamID = 1.  This doesn't make sense to me at all!  For example, I get the following results with this same query: First NameLast NameTeamGPPAABHAVGOBPSLG1B2B3BHRBBSACRRBI

BrianAustinHope83432230.7187500.7352941.15625014612201221

GabrielHelbigSafe Haven62119141.0000000.9375002.1428576404111519

MarkusJavorSafe Haven82927200.8695650.8000001.21739114501021218

RobBennettMelville83029240.8275860.8333331.55172411904102117

AdamBiesenthalSafe Haven82929210.9130430.9130431.56521712631001015

ErikGalvezMelville82625180.7200000.7307691.24000011322101015 As you can see, all teams except for Safe Haven's have the correct AVG and OBP.  Since AVG is simply H/AB, it doesn't make sense for Gabriel Helbig's results to be 1.00000. Can anyone shed ANY light on this please?Thank you in advance,Markuu  ***As a side note, could anyone also let me know how I could format the output so that AVG and OBP are only 3 decimal places? (ex: 0.719 for the 1st result)*** 

View 2 Replies View Related

Sql - If Not Found, Give Name

Mar 13, 2007

Been trying to get this one but need a little input.
SELECT a.Id,g.LabName......
FROM someTbl a,table g
WHERE a.id = @idAND (b.calLab = g.ID OR g.LabName = ???)
With the above, if b.calLab = 0 then there is no entry in table g.(I didn't develop the table or would have included NONE)
So, how to tell g.LabName to come back as 'None' if b.calLab = 0?
Thanks,
Zath

View 2 Replies View Related

Someone Can Give A Litgh?

May 17, 2004

Hi Everybody,

In a table there´s a field for store real values,
so...in the database, using the SQL Server Enterprise Manager
and execute query as 'select * from' and it return the value
'15,35' just like stored before, why using Delphi via an ADO conection
in my result set there is a '15,3500003814697' value if in the record time
the inputed value was '15,35'?
What I have doing wrong?

View 1 Replies View Related

Would You Like To Give Me Some Advice

May 28, 2004

hi,everyone
i use sybase before,and i want to learn ms sqlsr2000,can anybodu give me some advice,or give me some matrial
thx in advance

View 5 Replies View Related

Please Give Me Answer

May 20, 2008

batch processing means

View 3 Replies View Related

Getting Day If We Give Date

Jan 3, 2007

hi,
i want to get day if we give date.ie if i give 03-01-2006 it has to give day as wednesday.so what ever date if i give it has to give the day of the date.can any one please give me query for this

View 2 Replies View Related

Can Anyone Give Me A Query For This ?

Jul 20, 2005

These are my table structures . Could you please suggest me analternative:tblArticles: ArticleID,Title,Summary,ContextSubTypeID,PostDatetblArticlePages: ArticlePageID,ArticleID,PageNum,ContenttblAuthors:AuthorID, NametblArticleAuthors:ArticleID,AuthorIDtblContextSubtype:ContextSubTypeID,NameI need to get Author,PostDate,Title,tblContextSubType.Name,PageN um,Content,- these have to grouped accordingly by the respective fields. Contentneed not be grouped by.

View 2 Replies View Related

Re:Please Give Me Ur Suggestion

Nov 13, 2007

Hi
I am new to Sql Server

I have to select all fields from a table based on min(date) . i have duplicate accountnumbers in the query i need to eliminate that based on min(dateTime).
when i am writing a query

Select a,b,c,min(d) from table , it is not working?
Below is the example


A B C D
222 1 11 2007-02-12 14:09:16.000
222 1 8 2007-11-06 13:57:18.480



Any suggestions would be very helpful

View 3 Replies View Related

Give Sql Query For This Illustrations

Mar 28, 2008

Hai friends
 i have table student with 2 fields s_id,s_name
s_id      s_name1            raja2           ramu3           vinoth4            muthu5            arun
i have another table test with s_id who wrote test...
s_id    25
now i have to display like below....give me sql query
s_id   s_name2        ramu5        arun
Thanks in Advance...pl Help me......  

View 2 Replies View Related

Give Me Sql Query For One Illustrations

Mar 28, 2008

Hai friends i have table
s_team
id           name       game
 1           raja         cricket
2            ravi          football
3            muthu     cricket
4           pravin      cricket
5          hurry       football
 I have to diplay the above table in the following ...pl give me sql query
game          totalplayers
cricket            3
football           2
 

View 2 Replies View Related

Any Solution For This??Please Give Some Suggestions

Dec 11, 2001

I have started working with MS SQL Server 2000 recently. I have a scenario in which I require to know within the given period of time ( say 5 mins) , which all tables from a particular database got modified. I do not want to write a trigger for each and every table for all the 13 databases , my application deals with. I have even tried the following query:
declare @curdate datetime
select @curdate=getdate()
select name, refdate from sysobjects
where xtype = 'U' and refdate =@curdate

But nope it does not help me, since refdate is something else. Can anybody tell me how can you figure out from sysobjects when was a particular object last accessed , even this would serve my purpose.

I have trying to get this done via profiler. My applications api's connect to the database under some credentials which i do not know since I do not have access to source code ( i am doing black box testing). So I can't even put a trace on one particular user account. What I am doing currently is trapping all store procedure events..., but then its too much of work...

Hence I wanted to know , is there any way out for the situation where given a database name and a time span we can find out the tables modified/accessed within that time span from that database ???

View 3 Replies View Related

Xp_logingrant.......Can Anyone Give Me This Script

May 27, 1999

CAn you please give me a copy of this script...
THANK YOU...

View 1 Replies View Related

To Give A Table Lock

Oct 14, 2005

How can i give a table wise exclusive lock in MSSQL Server ?

I got the description but, How can I apply this ?
The sql :
LOCK TABLE <tablename> IN EXCLUSIVE MODE
is not working.

Is there any query/method to do this ?
Please help ...

thanks


About Exclusive locks
--------------------
Exclusive (X) locks are used for data modification operations, such as UPDATE, INSERT, or DELETE.

Other transactions cannot read or modify data locked with an Exclusive (X) lock. If a Shared (S) exists, other transactions cannot acquire an Exclusive (X) lock.
--------------------

View 2 Replies View Related

Bcp Command To Give Colums

Jan 8, 2004

Can someonte tell me that if i
bcp bda..mytable out c:discounts.xls -c -p , how can I put the first row as my column names since I get only data

View 2 Replies View Related

How To Give More Space For My SQL Database

Jan 11, 2007

(Please Rush)

Hi all,

I am using SQL SERVER 2000 now, and my SERVER is still have about 27 GB but in my database is saying only 3.4 MB left, I was trying to shrink my database but it is still did not give me more space.

Do you know any way could help me to extend more spaces for my database?

I also included the picture so could help you more

Thank you very much

vdang (vdang2003@sbcglobal.net)

View 4 Replies View Related

Where...Can It Give You The Most Recent Entries?

Jun 12, 2007

SELECT post.C_ID, post.Comment, post.Title, post.Date, authors.U_Name
FROM authors INNER JOIN
post ON authors.A_ID = post.A_ID
ORDER BY C_ID DESC

That's the query I'm using, and I was hoping there is a way to use the WHERE clause to have only the 5 highest #'s from my primary key, which is A_ID IDENTITY(1,1).

What would be the best way for me to do this? I also have date as a datetime, but then I could be getting more or less than 5 results in my query.

Thanks

View 3 Replies View Related

Wht Does This Give Divide By 0 Error?

May 24, 2007

I am using iif which works just fine in Access to prevent divide by zero errors but this:



=iif(Fields!oh_ret.Value<>0,(Fields!oh_ret.Value-Fields!oh_cost.Value)/Fields!oh_ret.Value,"")



Fails



As Does:





=iif(Fields!oh_ret.Value=0,"",(Fields!oh_ret.Value-Fields!oh_cost.Value)/Fields!oh_ret.Value)



Why? How do I get around this?

View 4 Replies View Related

Plz Help Me How To Give Reportname In Reportexecutionservice

May 14, 2007

Hi



Im trying to load a report using

Reportexecutionservice



like this

Reportexecutionservice.ExecutionInfo exinfo=res.LoadReport(reportname, null);



rptname consists of report which is present @ my server.How to give reportname inorder to load a report .im using reportingservice2005

plz do help me.



error im getting Unable to indentify the report.Plz tell what is path i should given in order to acces th report..

View 5 Replies View Related

Removing Individual Results From A Paged Set Of Results.

Oct 19, 2007

Hi,
I have a web form that lets users search for people in my database they wish to contact. The database returns a paged set of results using a CTE, Top X, and Row_number().
I would like to give my users to option of removing individual people from this list but cannot find a way to do this.
I have tried creating a session variable with a comma delimited list of ID's that I pass to my sproc and use in a NOT IN() statement. But I keep getting a "Input string was not in a correct format." Error Message.
Is there any way to do this? I am still new to stored procedures so any advice would be helpful.
Thanks
 

View 3 Replies View Related

PASTE SQL RESULTS INTO EXCEL - Funny Results

Jan 30, 2008

Hi, when I copy and paste results from query analyzer into Excel it appears that values with zeroes at the end loose the zeroes. Example, if I copy and paste V128.0 into an Excel cell it comes out as V128 or if I copy 178.70 it displays as 178.7 - any ideas? I'm using SQL Enterprise Manager for 2000.

View 6 Replies View Related

Anyone Give Solution(stored Procedure)?

Feb 28, 2008

 Table:Questionforum_id   quest_id          question                               description         quest_raised_by    raised_date             alert_me     approval  no_of_hits16             1    What is diff between asp and asp.net?    <Binary data>    JOHNYJP        2/27/2008 5:32:38 PM      True        True       NULL4               1     test question?                                     <Binary data>    SAMUEL        2/25/2008 12:25:05 PM      False        True       317             1    diff between asp.net1.0 and 2.0?            <Binary data>    MICHEL        2/27/2008 6:07:56 PM         False        True        315             2    What is diff vb6&vb.net?                        <Binary data>    MICHEL        2/27/2008 6:32:52 PM         True        True          514             1    what are features available?                   <Binary data>    RAGAVAN        2/26/2008 12:11:06 PM    True        True          915             1    VB6 tutorial..                                       <Binary data>    RAGAVAN        2/26/2008 12:12:29 PM       True        True        NULL14             2    Tell about access?                               <Binary data>    RAGAVAN        2/26/2008 12:14:09 PM       False       True         514             3    how to create grath in excel?                <Binary data>    SAMUEL        2/26/2008 12:23:31 PM        True        True          714             4    test1                                                  <Binary data>    MICHEL        2/27/2008 6:34:08 PM           True        True          24               2    new quest?                                        <Binary data>    SAMUEL        2/27/2008 6:38:20 PM          True        True           18               1    test quest for html?                            <Binary data>    GANESH        2/27/2008 6:41:07 PM          True        True         NULL4               3    test html tag2                                   <Binary data>    GANESH        2/27/2008 6:44:24 PM           False        True           NULL8               2    hello its for test?                              <Binary data>    MICHEL        2/27/2008 6:46:13 PM              False        True          NULL21             1    What is the new feature ?                  <Binary data>    SAMUEL        2/28/2008 9:30:43 AM            False        True         NULL22             1    What is the new feature ?                 <Binary data>    SAMUEL        2/28/2008 9:32:14 AM             True        True       NULL23             1    Is orcas released?                            <Binary data>    SAMUEL        2/28/2008 9:33:18 AM            True        True           NULL16             2    Test page for html code!!!!!!!....           <Binary data>    SAMUEL        2/28/2008 9:36:50 AM           True        True           417             2    explain with details?                         <Binary data>    SAMUEL        2/28/2008 4:46:08 PM             True        True         NULLTable:Replyforum_id   quest_id          ans_id     answer          reply_by        reply_on                    alert_me14        3                           12    <Binary data>    MICHEL    2/28/2008 3:57:46 PM    True4         1                               8    <Binary data>    GANESH    2/27/2008 4:46:52 PM    NULL15        2                            13    <Binary data>    SAMUEL    2/28/2008 4:20:36 PM    False4         2                             14    <Binary data>    SAMUEL    2/28/2008 4:46:39 PM    False14        3                            15    <Binary data>    GANESH    2/28/2008 4:49:12 PM    True14        2                           16    <Binary data>    GANESH    2/28/2008 4:50:01 PM    False16        2                           17    <Binary data>    GANESH    2/28/2008 4:51:02 PM    True17        1                            9    <Binary data>    MICHEL    2/27/2008 6:08:32 PM    NULL17        1                           10    <Binary data>    SAMUEL    2/27/2008 6:25:40 PM    NULL16        2                             11    <Binary data>    SAMUEL    2/28/2008 9:40:41 AM    NULLThis is my table structure.when i pass value only to 'quest_raised_by' field in question table.but I want following result,suppose i pass quest_raised_by='SAMUEL'forum_id   quest_id   quest_raised_by  ans_id   no_of_reply      answer          reply_by        reply_on                    alert_me      4                    1       SAMUEL                 8            1          <Binary data>    GANESH        2/27/2008 4:46:52 PM    NULL14                   3      SAMUEL                 15           2        <Binary data>    GANESH        2/28/2008 4:49:12 PM    True4                     2    SAMUEL                 14            1        <Binary data>    SAMUEL        2/28/2008 4:46:39 PM    False21                   1    SAMUEL                  -              0            -    -        -            -22                   1    SAMUEL                 -                0            -    -        -            -23                  1    SAMUEL                  -                0            -    -        -            -16                  2    SAMUEL                   17            2        <Binary data>    GANESH        2/28/2008 4:51:02 PM    True17                  2    SAMUEL                  -                0            -    -        -            -Any one give storedprocedure as soon as posible.Thanks,Durai            

View 4 Replies View Related

Give Solution Using Stored Procedure?

Feb 29, 2008

username      work_date               no_of_working_hours(nvarchar)a                02/17/2008                  0:50 a                02/18/2008                  0:50 a                02/23/2008                  0:20b                02/18/2008                  0:30 b                02/23/2008                  0:30 b                02/24/2008                  0:30 suppose i pass work_date from 02/18/2008 to 02/23/2008.i want following result username     total_no_of_working_hours(nvarchar)a                      1:10b                      1:00 How to write stored procedure?Thanks,Durai   

View 7 Replies View Related

Why Doesnt BETWEEN Give Me My Desired Result?

Dec 9, 2005

I am trying to select records based upon last name
WHERE     (Last_Name BETWEEN 'A%' AND 'C%')
When I run this I get only last names starting with A and B--no C. ?!?
This is confusing to me....I ran it with lastname >= 'A%' and lastname <='C%'and it returned only names starting with B. Why does SQL ignore the "="
I hope this isnt obvious :/
 
 

View 6 Replies View Related







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