Checking Whether Particular Field Present In The Result Set

Jul 17, 2007

Hi,

I have one dymic report and one of the requirement is that,I want to check whether particular field is present there or not



For e.g In one of the case Fields!Name will come and in other case it won't.

There one dynmic column which calculated values based on all the column.



If I write in value field of this column as follows.[If status = "Name" and Field is not missing then take Name value,if field name is Consumer take value from Consumer and shows it in column.]



=Switch(Fields!portfolio_status.Value="Name",IIF(Fields!IName.IsMissing,"0",Fields!Name.Value)

,Fields!portfolio_status.Value="Consumer",IIF(Fields!Consumer.IsMissing,"0",Fields!Consumer.Value))





In case,portfolio_status doesn't give me value "consumer" then I expect "0" to get printed.Problem here is that IIF expression tries to evaluate Fields!Consumer.Value even if it is not using this value and because of that my calculated column is not working.

I tried IsMissing,IsNothing..Nothing seems work.Basically I want to check if that field is there in result set or not.



IIF(IsNothing(Fields!Consumer),"0",Fields!Consumer.Value)

IIF(Fields!Consumer.Value Is Nothing,"0",Fields!Consumer.Value)

View 1 Replies


ADVERTISEMENT

T-SQL (SS2K8) :: Query Result To String And Present In New Row?

Oct 21, 2015

I have made following code:

I want to make a string from "TarLang.AppendText(String.Format("{1}" & vbCrLf, r("Source Language"), r("Target Language")))" and the result I get when I use that.

add the result into a new row in the datagridview

Dim CompanyID As String
CompanyID = OrderNR.SelectedItem.ToString()
SQL.ExecQuery(String.Format("SELECT snSrc.kod as 'Source Language', snTrg.kod as 'Target Language' FROM [teknotrans_dev].dbo.OpusOrderrow as ord INNER JOIN [teknotrans_dev].dbo.OrderVolvoLanguageName as snSrc

[code].....

View 2 Replies View Related

Checking 2 Columns And Displaying Result In 1 Column

Apr 13, 2012

Ihave 2 tables...they are basically the same except for the column name in one of them because they deal with 2 different names, though..the data i want is in columns that have the same name.pretty much what i want to do...is .they also need to be distinct so i dont count duplicates...i can get them as separate tables...but i cant get them together..I need them in 1 column because of how it is sent to the C3 code page and how it reads it...the structure has already been previously set..and there are about 5 other statments that are being executed in this one stored procedure like this (also i wasnt the one who set this up).

image 1 is what is currently set up
imgur: the simple image sharer
top part is what is stored in tables..bottom is more of the result
it basically runs this code to get the bottom

DECLARE @id INT;
DECLARE @invest nvarchar(50);
SET @id = '7633';
SET @invest = '';
SELECT 'a' + CONVERT(nvarchar, orderfindings.risk_rating) AS cat, COUNT(DISTINCT orderfindings.prnt_id) AS stat
FROM orderheader, orderaudits, orderfindings
WHERE orderheader.id = orderaudits.orderheader_id AND orderaudits.ID = orderfindings.prnt_id
AND orderheader.id = @id AND orderfindings.risk_rating > 0 AND orderaudits.Investor_Name LIKE '%' + @invest + '%'
GROUP BY orderfindings.risk_rating

If i want agencies instead of findings..just replace it..agencies and findings are the 2 tables..they are the pretty much identical column wise...but i want the result together..i've tried several ways..but i cant seem to get it.

image 2 - the table at the bottom is more what i'm looking for..it combines them both into 1
imgur: the simple image sharer

if an order has a finding or agency or both in it..then it gets marked as a 1 for that risk rating...if it doesnt..then 0 for that risk rating..and then sum them all up to see what i got..

I've been working with it...did this [SQL] compare2 - Pastebin.com ..got it to display 2 columns..but still not the right result...i'm getting a1 = 1...a2 = 1...so its not running through all the orders...or it needs a way to count it...i put a sum at beginning of case statement..erro because of counts...so i took counts out...

View 7 Replies View Related

Checking If A Field Is Empty

Oct 19, 2007

i want to check if one of the fields is empty. however i cant seem to get it working
string strSQL = "select * from 15Course_Listing where
Package_listingNo =''";

it does not return anything, however i have empty fields in package_listingNo

i have been trying to get around this for some time and its killing me. need help please

View 5 Replies View Related

Checking Datatypes Of A Field Accoss Multiple Tables

Jul 23, 2005

I have a tables called subsid that I need to change the datatype fromtext to int.I think I got them all but is there a query I can run that will checkall fields call subsid accross all tables that are of type text.

View 1 Replies View Related

Conditional Execution With Null Checking For DateTime Field

Mar 11, 2008

There was a similar question to mine a few time ago about conditional execution, but I'm having some problems with it to which I couldn't find any answer, could anyone help?

My condition is checking if a DateTime from a DB table is null. I use the Execute SQL Task to retrieve the record (SELECT TOP 1 * FROM myTable WHERE conditions = TRUE), then I map 2 fields to their respective global variables.

Then I created the green arrow connector and used a precedence expression based on sucess. I used the expression IsNull(@variable). For some reason, even if the @variable comes as null - I checked the info in the DB - it still comes out as '1999-11-30'

I've looked around and the IsNull method can be used to also change the value in the event of it being null, could it be changing my variables value to this even if I didn't pass that value as a parameter to the function? If so, how else can I test it for null? I've tried "== null", "= null" and even ".equals(null)" - which I know is absurd, but I'm running out of options here...

Could you enlighten me, please???
Thanks in advance!

View 4 Replies View Related

How Check Field - And Add Result Row At END

Mar 11, 2008

help
i need to check each column
and if i don't have the value
than add to a new result row


if not show the missing value

if i have in the field A B C than OK (like day1 + day2)

if i don't have the value A B C than than show it like this a|b|c (like day3)


if i don't have the value c than than show it like this -|-|c (like day4)



if i don't have the value a than than show it like this a|-|- (like day5)




if i don't have the value b than than show it like this -|b|- (like day6)

day1 day2 day3 day4 day5 day6
-------------------------------------------------------------------------
* c * a c a
* a * a c *
a b # b b c
b * $ Q c s
c # 0 0 0 *
---------------------------------------------------------------------new result row
ok ok a|b|c -|-|c a|-|- -|b|-
TNX

View 7 Replies View Related

Concatinating Two Field And Insert The Result

Aug 20, 2005

Hii,I need to concatinate two field and insert the result into each record. So far I managed to display the concatination but how do I insert it?use northwind
select city, region,([city]+ +[region]) as uniqefrom customerswhere region is not nullThe resulting records in Quary Anchorage AK AnchorageAKTsawassen BC TsawassenBCVancouver BC VancouverBCSan Francisco CA San FranciscoCA
 

View 1 Replies View Related

Create An Array In A Result Field

Sep 12, 2006

I am between the "newbie" and "intermediate" stages of writing SQL code and I am wondering if there is a way to capture multiple results into one field so I can basically create a "set" for a unique identifier.  Here is few result samples I receive from this code I am using now.  
ReqNo              ProcID
7102005          1409
7102005          1796
7139003          1411
7139003          6097
7261030          1409
7261030          1796
7268303          3998
7268303          4000
 
I would like to create a single row for each "ReqNo" and have a field that will an array of the  "ProcID" results I receive.  In other words, for the first "ReqNo" 7102005, can I create a field that will combine the 1409, 1796 into one field?  I am trying to capture an array of integers used for that "ReqNo" so I can use that as a unique identifier in a join for another table. 
 
So, ideally my result would be:
ReqNo             ProcSet
7102005          1409, 1796
7139003          1411, 6097
7261030          1409, 1796
7268303          3998, 4000
 
Is this possible?


declare
@startdate smalldatetime,
@enddate smalldatetime ,
@month int,
@year int
 
select
 @startdate = dateadd (dd, -7, getdate())
SELECT
@month = datepart (month, @startdate),
@year = datepart (year, @startdate)
SELECT
@startdate = convert (smalldatetime, convert(varchar(2), @month) + "/1/" + convert (varchar(4), @year))
 
select
@enddate = dateadd (dd, 1 , @startdate)
 
select distinct
pp_req_no as ReqNo,
pp_cproc_id_r as ProcID
 
from
risdb_rch08_stag..performed_procedure
(index pp_serv_time_r_ndx)
 
where
pp_service_time_r between @Startdate and @Enddate
and pp_status_v = 'CP'
and pp_rep_id > 0
 
order by
pp_req_no, pp_cproc_id_r

 

View 4 Replies View Related

SQL Server 2012 :: Updating A Field Based On Result Set

Feb 21, 2014

I am trying to update records based on the results of a query with a subquery.

The result set being produced shows the record of an item number. This result produces the correct ItemNo which I need to update. The field I am looking to update is an integer named Block.

When I run the update statement all records are updated and not the result set when I run the query by itself.

Below you will find the code I am running:

create table #Items
(
ItemNovarchar (50),
SearchNo varchar (50),
Historical int,
Blocked int

[Code] ....

Below is the code I am using in an attempt to update the block column but it updates all records and not the ones which I need to have the Blocked field set to 1.

Update #items set Blocked = 1
Where Exists
(
SELECT ItemNo=MAX(CASE rn WHEN 1 THEN ItemNo END)
--,SearchNo
--,COUNT(*)

[Code] ...

Why is the update changing each record? How can I change the update to choose the correct records?

View 6 Replies View Related

SQL Server 2012 :: Replace A Result Value Based On Value Of Another Field?

May 7, 2015

I would like to replace the value in the Select query of CO OWNER with a space ' ' or NULL if the ORDINAL value = 0.

The CO OWNER name is stored in the CARDNAME table, and the OWNER name is stored in the NAME table. I can not change the db structure.

JEAN is the ACCOUNT owner and BILL is CO OWNER of two cards.

Current Select Results:

ACCOUNT CARD ORDINAL CO OWNER OWNER
200500 9999999999999100 2 BILL JEAN
200500 9999999999999101 1 BILL JEAN
200500 9999999999999102 0 BILL JEAN

Desired Select Results:

ACCOUNT CARD ORDINAL CO OWNER OWNER
200500 9999999999999100 2 BILL JEAN
200500 9999999999999101 1 BILL JEAN
200500 9999999999999102 0 NULL JEAN

Current SQL Select statement:

SELECT DISTINCT
CARD.PARENTACCOUNT AS ACCOUNT,
CARD.NUMBER AS CARD,
CARD.ORDINAL,
CARD.STATUS,
CARDNAME.FIRST AS CO_OWNER,

[code]....

View 9 Replies View Related

Query On Datetime Field Giving Eroneous Result

Mar 20, 2008

Hi,

I am trying to fetch some data from a table .
I wanted to fetch data for which the order_date is >= 1st january 2005 and order_date< 10th January 2005 and for that I have a query

like
1>



SELECT * FROM SALES_ORDER WHERE


ORDER_DATE >= '01/01/2005' and ORDER_DATE <'10/01/2005'


In this query i am getting result for which the order_date is 2005-05-27 and lots of other data for which my criteria is not matching.
The Order_Date is a datetime field.

If I am use convert function then i am getting the expected result

like
2>
SELECT * FROM SALES_ORDER WHERE
convert (datetime, convert (varchar,ORDER_DATE,101), 101) >= '01/01/2005'
AND
convert (datetime, convert (varchar,ORDER_DATE,101), 101) < '01/10/2005'

Why the first query is not giving me correct result ?

View 4 Replies View Related

Binding Report/Field 'language' Setting To Query/Parameter Result.

Oct 24, 2007

Hello,

I have a report which displays a customers invoice, in both the companys local currency, and the customers local currency.

The report language is "English (United Kingdom)"
The fields showing customers currency language setting is set to something else, i.e. "France (French)" to display the Euro currency.

The application handles 34 currencies, the query returns the language string, ("France (French)"), to allow the report to bind its language setting to the querys output.

However, it doesn't work, a normal textbox will display the correct country name string, but Reporting Services cannot bind the language setting to a query result. So I also tried setting it as a report parameter, but no joy either (all currencys revert to USD).

I'm using =First(Fields!curFormat.Value, "myDataSet") to bind the 'language' setting, the result of this expression returns "France (French)", which is a valid option for this language setting, as it's in the drop down list.

Rather than create 34 seperate reports for each currency, are there any suggestions on how to bind a fields language setting to a query result?

View 3 Replies View Related

Moving From One Table To Other Table Automatically For Every 3 Months By Checking The Paticular Value Of The Table Field

Mar 29, 2007

Hi
 
I am having a table called as status ,in that table one field is there i.e. currentstatus.
the rows which are having currentstatus as "ticket closed",i want to move those rows into  other table called repository which is having same table structure as status table.
I can do programatically.
but is there any way for every 3 months system has to check and do this action means moving to repository table automatically?
 
Please help me.
 
Thanks.

View 1 Replies View Related

(Urgent) How Get A Text Field And Put The Result Into A Text Var

May 3, 2004

Hi All

Iam trying to Get a text field value i wrote this code

DECLARE @ptrval varbinary(16)
DECLARE @length bigint
SELECT @ptrval = TEXTPTR(Template), @length = LEN(Template)
FROM #TEMPLATE
READTEXT Template.#TEMPLATE @ptrval 0 @length

but i need to put the result into a text var
is that possible or not and if it possible any one could help me with that

View 1 Replies View Related

Set Variable Based On Result Of Procedure OR Update Columns Fromsproc Result

Jul 20, 2005

I need to send the result of a procedure to an update statement.Basically updating the column of one table with the result of aquery in a stored procedure. It only returns one value, if it didnt Icould see why it would not work, but it only returns a count.Lets say I have a sproc like so:create proc sp_countclients@datecreated datetimeasset nocount onselect count(clientid) as countfrom clientstablewhere datecreated > @datecreatedThen, I want to update another table with that value:Declare @dc datetimeset @dc = '2003-09-30'update anothertableset ClientCount = (exec sp_countclients @dc) -- this line errorswhere id_ = @@identityOR, I could try this, but still gives me error:declare @c intset @c = exec sp_countclients @dcWhat should I do?Thanks in advance!Greg

View 4 Replies View Related

Problem Assigning SQL Task Result To A Variable - Select Count(*) Result From Oracle Connection

Dec 26, 2007



I have an Execute SQL Task that executes "select count(*) as Row_Count from xyztable" from an Oracle Server. I'm trying to assign the result to a variable. However when I try to execute I get an error:
[Execute SQL Task] Error: An error occurred while assigning a value to variable "RowCount": "Unsupported data type on result set binding Row_Count.".

Which data type should I use for the variable, RowCount? I've tried Int16, Int32, Int64.

Thanks!

View 5 Replies View Related

How To Insert A Row Only If It's Not Present

Apr 16, 2008

Hi,

I've been asked to find a way to insert a row only if it's not present. I want to make sure that test and insert are atomic, so I wrote the following test cases


-- CREATE TABLE t1 ( id int, val varchar(256) )

-- GO


-- Execute the following statements in one query window

IF NOT EXISTS(SELECT * FROM t3 WHERE id = 1)

BEGIN


WAITFOR DELAY '00:00:10'

INSERT INTO t3(id, val) VALUES (1, 'Query 1')

END

GO


-- Then execute the following statements in a second query window within ten

-- seconds of the starting the first query

IF NOT EXISTS(SELECT * FROM t3 WHERE id = 1)

BEGIN


WAITFOR DELAY '00:00:10'

INSERT INTO t3(id, val) VALUES (1, 'Query 2')

END

GO


When both queries are complete there will be two rows in the table t with id = 1.

1 Query 2
1 Query 1

Wrapping the code in a transaction does not change the result. Changing the transaction isolation level to serialable causes a deadlock, but otherwise the isolation level has no effect on the result either. Adding a WITH (TABLOCK) hint to the tests do not change the result.

Our clients use a mix of SQL 2000 and SQL 2005 so TRY/CATCH blocks cannot be used.

Any suggestion on how to do this?

Thanks

View 11 Replies View Related

The Given Key Was Not Present In The Dictionary

Feb 4, 2008



I'm developing a report which contains a number of matrixes which are ordered in a hierarchy which can be navigated using a document map. One of the matrixes contains a subreport containing a table which displays a description for the matrix and the corresponding document map label. This is working without problem already in the production environment.

Recently, after updating my machine with numerous updates and patches, this stopped functioning. I now receive the error message, "The given key was not present in the dictionary" when I run this subreport, either as part of the greater report or on its own.

I have seen the posting which recommends deleting the report.rdl.data files. This did not solve the issue.

The data and the dataset are both in sync. When I click the "Print layout" button when previewing the report in Visual Studio .Net 2005, I can view the data. This looks like a bug in the VS.NET 2005 report designer.

I am running SQL Server 2005 SP2.

Any help is appreciated.

Regards,
Bill Mueller

View 3 Replies View Related

Not Present On The Subscriber.

Dec 11, 2006

Hi all,

Publisher
SQL 2000 Snapshot publication timed to run at 23:00 daily All tables & views are published articles.Snapshot agent runs and creates a snapshot of all articles.

Subscriber
SQL 2005 Pull subscription set to run continuously Manually run the SQL agent job and I get the following error... 2006-12-11 15:04:35.687 Agent message code 20164. Unable to replicate a view or function because the referenced objects or columns are not present on the Subscriber.

I've tried creating the subscription database from a backup so I know all the tables & views exist and also tried just creating a blank empty database - same error.

There are no user stored procedures or functions in the database.

If I'm publishing all tables & views then why should the data & structure fail to load at the subscriber? Do I need two publications, the first containing the metadata and the second containing the data?

Thanks in advance
Dave

View 6 Replies View Related

Table-valued User-defined Function: Commands Completed Successfully, Where Is The Result? How Can I See Output Of The Result?

Dec 11, 2007

Hi all,

I copied the following code from Microsoft SQL Server 2005 Online (September 2007):
UDF_table.sql:

USE AdventureWorks;

GO

IF OBJECT_ID(N'dbo.ufnGetContactInformation', N'TF') IS NOT NULL

DROP FUNCTION dbo.ufnGetContactInformation;

GO

CREATE FUNCTION dbo.ufnGetContactInformation(@ContactID int)

RETURNS @retContactInformation TABLE

(

-- Columns returned by the function

ContactID int PRIMARY KEY NOT NULL,

FirstName nvarchar(50) NULL,

LastName nvarchar(50) NULL,

JobTitle nvarchar(50) NULL,

ContactType nvarchar(50) NULL

)

AS

-- Returns the first name, last name, job title, and contact type for the specified contact.

BEGIN

DECLARE

@FirstName nvarchar(50),

@LastName nvarchar(50),

@JobTitle nvarchar(50),

@ContactType nvarchar(50);

-- Get common contact information

SELECT

@ContactID = ContactID,

@FirstName = FirstName,

@LastName = LastName

FROM Person.Contact

WHERE ContactID = @ContactID;

SELECT @JobTitle =

CASE

-- Check for employee

WHEN EXISTS(SELECT * FROM HumanResources.Employee e

WHERE e.ContactID = @ContactID)

THEN (SELECT Title

FROM HumanResources.Employee

WHERE ContactID = @ContactID)

-- Check for vendor

WHEN EXISTS(SELECT * FROM Purchasing.VendorContact vc

INNER JOIN Person.ContactType ct

ON vc.ContactTypeID = ct.ContactTypeID

WHERE vc.ContactID = @ContactID)

THEN (SELECT ct.Name

FROM Purchasing.VendorContact vc

INNER JOIN Person.ContactType ct

ON vc.ContactTypeID = ct.ContactTypeID

WHERE vc.ContactID = @ContactID)

-- Check for store

WHEN EXISTS(SELECT * FROM Sales.StoreContact sc

INNER JOIN Person.ContactType ct

ON sc.ContactTypeID = ct.ContactTypeID

WHERE sc.ContactID = @ContactID)

THEN (SELECT ct.Name

FROM Sales.StoreContact sc

INNER JOIN Person.ContactType ct

ON sc.ContactTypeID = ct.ContactTypeID

WHERE ContactID = @ContactID)

ELSE NULL

END;

SET @ContactType =

CASE

-- Check for employee

WHEN EXISTS(SELECT * FROM HumanResources.Employee e

WHERE e.ContactID = @ContactID)

THEN 'Employee'

-- Check for vendor

WHEN EXISTS(SELECT * FROM Purchasing.VendorContact vc

INNER JOIN Person.ContactType ct

ON vc.ContactTypeID = ct.ContactTypeID

WHERE vc.ContactID = @ContactID)

THEN 'Vendor Contact'

-- Check for store

WHEN EXISTS(SELECT * FROM Sales.StoreContact sc

INNER JOIN Person.ContactType ct

ON sc.ContactTypeID = ct.ContactTypeID

WHERE sc.ContactID = @ContactID)

THEN 'Store Contact'

-- Check for individual consumer

WHEN EXISTS(SELECT * FROM Sales.Individual i

WHERE i.ContactID = @ContactID)

THEN 'Consumer'

END;

-- Return the information to the caller

IF @ContactID IS NOT NULL

BEGIN

INSERT @retContactInformation

SELECT @ContactID, @FirstName, @LastName, @JobTitle, @ContactType;

END;

RETURN;

END;

GO

----------------------------------------------------------------------
I executed it in my SQL Server Management Studio Express and I got: Commands completed successfully. I do not know where the result is and how to get the result viewed. Please help and advise.

Thanks in advance,
Scott Chang

View 1 Replies View Related

Saving Query Result To A File , When View Result Got TLV Error

Feb 13, 2001

HI,
I ran a select * from customers where state ='va', this is the result...

(29 row(s) affected)
The following file has been saved successfully:
C:outputcustomers.rpt 10826 bytes

I choose Query select to a file
then when I tried to open the customer.rpt from the c drive I got this error message. I am not sure why this happend
invalid TLV record

Thanks for your help

Ali

View 1 Replies View Related

End Result Is Main Query Results Ordered By Nested Result

May 1, 2008

As the topic suggests I need the end results to show a list of shows and their dates ordered by date DESC.
Tables I have are structured as follows:

SHOWS
showID
showTitle

SHOWACCESS
showID
remoteID

VIDEOS
videoDate
showID

SQL is as follows:

SELECT shows.showID AS showID, shows.showTitle AS showTitle,
(SELECT MAX(videos.videoFilmDate) AS vidDate FROM videos WHERE videos.showID = shows.showID)
FROM shows, showAccess
WHERE shows.showID = showAccess.showID
AND showAccess.remoteID=21
ORDER BY vidDate DESC;

I had it ordering by showTitle and it worked fine, but I need it to order by vidDate.
Can anyone shed some light on where I am going wrong?

thanks

View 3 Replies View Related

CASE Function Result With Result Expression Values (for IN Keyword)

Aug 2, 2007

I am trying to code a WHERE xxxx IN ('aaa','bbb','ccc') requirement but it the return values for the IN keyword changes according to another column, thus the need for a CASE function.

WHERE GROUP.GROUP_ID = 2 AND DEPT.DEPT_ID = 'D' AND WORK_TYPE_ID IN ( CASE DEPT_ID WHEN 'D' THEN 'A','B','C' <---- ERROR WHEN 'F' THEN 'C','D ELSE 'A','B','C','D' END )

I kept on getting errors, like

Msg 156, Level 15, State 1, Line 44Incorrect syntax near the keyword 'WHERE'.
which leads me to assume that the CASE ... WHEN ... THEN statement does not allow mutiple values for result expression. Is there a way to get the SQL above to work or code the same logic in a different manner in just one simple SQL, and not a procedure or T-SQL script.

View 3 Replies View Related

Effectively Getting Data And Present It By Location

Jun 16, 2008

Hello. I have been challanged to build an application that keeps track of inventory and dates of every item that needs inspection on regular intervals. The original application was a .NET windows application and i have been tasked to "port" and improve it to a .NET C# web application.
The original database was in access and i have imported everyting to SQL and all the data is in a single table. So far the table is relatively small so i decided to keep the current database design.
What i need to do is to select all the items that are comming up for inspection in the comming months and present them. Each item has a uniqe article number (artnr) with the item name, category and location of the item. The location is the part i would like each items to be presented by. Basicly i would like to retrive artnr, name, type and present x number of gridviews or a sorted presentation where each item is shown inside each gw/whatever by location.
I also considered moving all locations to it's own table and connect it with a PK/FK to the prinmary article table but i dont know if this will help me or not. Basicly i have no idea how i would present the items by location where each gridview/somethign else is it's own location.
I could really use som help with how i can retrive and present the data so it is showed in the above manner.

View 1 Replies View Related

Cascade Deletions Of Children When FKs Present

Dec 8, 1999

Guys, could anyone tell me if MSSQL Server 7 has 'on delete cascade' option when creating a foreign key constraint or something similar to it. I'd really like MSSQL to remove all dependent records (child records) automatically from one table when I'm deleting a parent record from another record. I know that I can do it via trigger, but the FK constraint should be removed or disabled. I would really appreciate your help. Thank you very much.

View 1 Replies View Related

Is Connect BY Clause Present In SQL Server ?

Feb 16, 2007

Hi,

We need to create a tree stucture output of a query.
In case of Oracle , there is 'CONNECT BY' Clause for creating the same.

Does SQL server support anything of this sort?

If yes, can anybody please provide the syntax for the same?

Regards
Kiran

View 4 Replies View Related

Selecting The Records In The Present Week

Dec 3, 2007

Dear All,

I want to retrive the records if are created in a particular week.
if i pass 03/12/2007 , i want get records which are created in that week

View 11 Replies View Related

How To Present Time Series Chart On The Web

May 28, 2006

Help me!!

1. Can you tell me the way to present Time Series Chart on The Web by ASP.Net 2.0
2. I have a Time Series Mining Model. Its structure is:

(Month datetime key time, Sales continous predict)

When the query runs:


select Flattened  Predict(sales,5)

from Model_Name
The result is Month and sales in the future. But i wan also retrieve Month and Sales in the past . Tell me the way?????

Thank alots!!!!!!!

View 4 Replies View Related

Retrieve All The Filename Present In One Particular Location In SQL

Dec 20, 2007



Hi,

I need to read all the text files present in one particular folder and have to place all the contents in the file into a table. I will be knowing the location of the file but i will not be knowing the name of the file. I am using a BULK INSERT command to place all the contents to a table.
Eg: BULK INSERT TEST FROM '\BSSC018C$IP Office LogsLog 20071206 000000 (5).txt'
To use BULK INSERT i have to specify the location of the file with the filename. So can anyone please help me to know how the names of the file can be fetched through SQL query. If i am able to get all the file names i can use a cursor and insert all the datas from all the text files.

Thank you.

View 18 Replies View Related

Reporting Services :: The Given Key Was Not Present In The Dictionary

Jul 5, 2006

When I try to preview a SSRS report in VS 2005 I get the following error: "The given key was not present in the dictionary", however when I deploy the report and view it in the Report Manager all is fine. I have not been able to find any useful info in MSDN, what I can try?

View 8 Replies View Related

RMO ERROR : No Signature Was Present In The Subject.

Jun 7, 2007

Hi !

I have such a message after trying to do replication with SQL Server 2005 using custom Business Logic Handler for a Merge Article (RMO Programming).

Message Replication-Replication Merge Subsystem: agent 'job' failed. No signature was present in the subject.

I am using C# with RMO, merge replication.

Any ideas ? How to solve this problem ?

Thanks.

View 2 Replies View Related

Can't Login Remotely Even Though Membership Data Is Present

Dec 18, 2006

(Sorry this was posted to VWD2005 Express by mistake)
I have created a simple project using ASP.NET 2.0 which enables a user to login. I created the login user using the Web Administration Tool in Visual Studio 2005.
I created everything locally and it worked.
Locally I have 2 databases. One containing normal data (which my site uses to populate a GridView control) and the other being ASPNETDB.MDF - which contains membership (login user) data. These 2 databases sit in the App_Data folder which is in the root of the project.
I have a remote database which is hosted in a shared environment.
This is just the one database and it appears to have all tables in the one database (membership tables and normal tables - such as the one I use to populate my GridView control).
I uploaded the website and using the Database Publishing Wizard I uploaded the database data to the shared host. I also changed the connection string to point to my remote database.
If I visit the website the GridView is populating correctly (pulling data from the remote database) but when I try to login it crashes. The error is "Access denied creating App_Data sub directory".
The membership login details for the user I created are in the remote database as I have compared the data in it to the data in my ASPNETDB.MDF local database.
If I launch from within Visual Studio 2005 then it allows me to login perfectly well.
Please does anybody know why it won't let me login when I access it via the website?
Many thanks for any help,
Graham

View 3 Replies View Related







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