Showing posts with label building. Show all posts
Showing posts with label building. Show all posts

Friday, March 30, 2012

Need help building/reading C# SQL Array

I'm stuck and uinder a bit of a time crunch.

I have 5 fields I want to get out of a sql database using a function that I'm writing. I figure it sounds like an array. basically I want to make an array, and fill it up with the results of a sql select, then read the array.

This is what I have so far....

String TempHRAcctCode, TempJobDescription, TempHourlyRate, TempEmplID;
Array TempArray;
TempJobDescription = DDDept.SelectedItem.Text; (to get KeY Value)

SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["MYCONN"].ToString());
connection.Open();
SqlCommand command = new SqlCommand("Select HRAcctCode, HourlyRate , EmplID, ... FROM TimeMyProfile WHERE JobDescription = " + TempJobDescription + " ", connection);
SqlDataReader TempDataReader = command.ExecuteReader;
while TempDataReader.Read
(
... OK I GIVE UP!

Thanks in advance



why you want read as an array ?? If you really want to read these data later then load into aDataSetrather than reading from Data Reader into an array and then later read again the array...

using (SqlDataAdapter da = new SqlDataAdapter(command))
{
DataSet ds = new DataSet();

// Fill the DataSet using default values for DataTable names, etc
da.Fill(ds);

connection.Close();

// Return the dataset
return ds;
}

And you can read the data set like

foreach (DataRow dr in ds.Tables[0] .Rows)

{

string myVar = dr["HourlyRate"].ToString()

}

|||

Funny thing is, as I was typing th equestion I was asking myself the same thing, WHY use an array!
Excellent suggestion, it works GREAAT!

Thanks

Need help building a cube

hi,

i am a newbie to Analysis Services. Could someone help me build a cube. I read somewhere that a cube must contain some sort of measure or aggregate, however, i am working with data that has no need for a measure, it doesn't have columns that could be used as a measure(i.e. units or currency)...how can i build a cube without a measure and is this possible?

thanks

yadgor2000

Yadgor - without a measure there's nothing to cube up. What kind of data are you trying to analyze via a cube? I'd also highly recommend Harinath & Quinn's SSAS book if you're trying to get up to speed in Analysis Services...it's incredibly useful for me.|||

May be Ur not getting the actual facts in your data base...first prepare your dimensional modeling....then think again. Or U should take advice from Sr. Database guys in Ur organisation regarding...

Thanks

|||As per the other replies: If you have no measures, you have nothing to analyse... so the question to be answered is why are you trying to build a cube? Maybe some other technology would be more appropriate.sql

Wednesday, March 21, 2012

Need Assistance with Dynamic Properties and FTP Task

Hello,

I am building a packge where an FTP task needs to pull down a single
file
every day from a specific location. The location will only have the
one file.
The file name will be different every day. A sample of one of the file
names
looks like this:

CDNSC.CDNSC.SC00015.04012007

The file names will be different every day, as the last eight digits
represent the date of the data in the file. The source files will be
located
in a subdirectory called 'outgoing'.

My first approach to this has been to use a Dyamic Properties Task to
set
the SourceFileName of the FTP Task. I tried using a sting Global
Variable
expressed as *.*.*.* thinking a wildcard would work, but it didn't.

What approaches can I take so that the Source Filename in the FTP task
will
dymanically update each day to get the one file?

Thank you for your help!

cdun2On Apr 4, 5:35 am, "cdun2" <ChrisDunnM...@.gmail.comwrote:

Quote:

Originally Posted by

Hello,
>
I am building a packge where an FTP task needs to pull down a single
file
every day from a specific location. The location will only have the
one file.
The file name will be different every day. A sample of one of the file
names
looks like this:
>
CDNSC.CDNSC.SC00015.04012007
>
The file names will be different every day, as the last eight digits
represent the date of the data in the file. The source files will be
located
in a subdirectory called 'outgoing'.
>
My first approach to this has been to use a Dyamic Properties Task to
set
the SourceFileName of the FTP Task. I tried using a sting Global
Variable
expressed as *.*.*.* thinking a wildcard would work, but it didn't.
>
What approaches can I take so that the Source Filename in the FTP task
will
dymanically update each day to get the one file?
>
Thank you for your help!
>
cdun2


I wound up creating a script solution that was pretty straight
forward. I basically set up string variables using DATE to get the
data portion of the file name, concatenated that to the first part of
the filename, and set the whole string equal to the SourceFileName of
the FTP Task. It seems to work fine.

cdun2sql

Monday, March 12, 2012

Need advice on hardware for SQL 2005

Hello,
I would appreciate if someone can give some advice on hardware for building
up SQL 2005 cluster. We will have 4 database of 50 GB each. How many
processors, memory,... do I need? My preference is to go for HP servers
Thanks in advanceIt is hard to say, it depends on several factors, specially your budget.
And probably you already know about this, but just in case:
- A 64-bit system is highly recommended.
- The hardware you select must be on the Microsoft Windows Catalog and
Hardware Compatibility List under the cluster category
(http://www.microsoft.com/whdc/hcl/default.mspx)
See Before Installing Failover Clustering on BOL at
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/instsql9/html/a655225d-8c54-4b30-95fd-31f588167899.htm
Ben Nevarez, MCDBA, OCP
Database Administrator
"Slimo" wrote:
> Hello,
> I would appreciate if someone can give some advice on hardware for building
> up SQL 2005 cluster. We will have 4 database of 50 GB each. How many
> processors, memory,... do I need? My preference is to go for HP servers
> Thanks in advance
>
>

Saturday, February 25, 2012

Nearest-neighbour logic - please help!

Hi,
Hope you can help me with this one. I'm building a search engine with
a SQL Server 2000 box in the backend. If a user gets no result for some
search but there is a close match - I want that match to be suggested
(or any others).
Now I believe that the technology to use is called: "Ternary Search
Trees" (due to a fast implementation of the Levenshtein Distance
algorithm). However in SQL Server 2000 the equivalent to sue is called
"indexed views".
My question is am I right? Can anyone out there give me a few pointers
i nthe right directions please? Any comments/suggestions/help greatly
appreciated...
Cheers,
Al.Hi,
Indexed views would have nothing in particular to do with advanced search
algorithms.
You may wish to investigate the SOUNDEX and associated functions. See Books
Online.
Thank you,
Daniel Jameson
SQL Server DBA
Children's Oncology Group
www.childrensoncologygroup.org
<almurph@.altavista.com> wrote in message
news:1163420393.594947.317930@.k70g2000cwa.googlegroups.com...
> Hi,
>
> Hope you can help me with this one. I'm building a search engine with
> a SQL Server 2000 box in the backend. If a user gets no result for some
> search but there is a close match - I want that match to be suggested
> (or any others).
> Now I believe that the technology to use is called: "Ternary Search
> Trees" (due to a fast implementation of the Levenshtein Distance
> algorithm). However in SQL Server 2000 the equivalent to sue is called
> "indexed views".
> My question is am I right? Can anyone out there give me a few pointers
> i nthe right directions please? Any comments/suggestions/help greatly
> appreciated...
> Cheers,
> Al.
>

Nearest-neighbour logic - please help!

Hi,
Hope you can help me with this one. I'm building a search engine with
a SQL Server 2000 box in the backend. If a user gets no result for some
search but there is a close match - I want that match to be suggested
(or any others).
Now I believe that the technology to use is called: "Ternary Search
Trees" (due to a fast implementation of the Levenshtein Distance
algorithm). However in SQL Server 2000 the equivalent to sue is called
"indexed views".
My question is am I right? Can anyone out there give me a few pointers
i nthe right directions please? Any comments/suggestions/help greatly
appreciated...
Cheers,
Al.Hi,
Indexed views would have nothing in particular to do with advanced search
algorithms.
You may wish to investigate the SOUNDEX and associated functions. See Books
Online.
--
Thank you,
Daniel Jameson
SQL Server DBA
Children's Oncology Group
www.childrensoncologygroup.org
<almurph@.altavista.com> wrote in message
news:1163420393.594947.317930@.k70g2000cwa.googlegroups.com...
> Hi,
>
> Hope you can help me with this one. I'm building a search engine with
> a SQL Server 2000 box in the backend. If a user gets no result for some
> search but there is a close match - I want that match to be suggested
> (or any others).
> Now I believe that the technology to use is called: "Ternary Search
> Trees" (due to a fast implementation of the Levenshtein Distance
> algorithm). However in SQL Server 2000 the equivalent to sue is called
> "indexed views".
> My question is am I right? Can anyone out there give me a few pointers
> i nthe right directions please? Any comments/suggestions/help greatly
> appreciated...
> Cheers,
> Al.
>

Nearest-neighbour logic - please help!

Hi,
Hope you can help me with this one. I'm building a search engine with
a SQL Server 2000 box in the backend. If a user gets no result for some
search but there is a close match - I want that match to be suggested
(or any others).
Now I believe that the technology to use is called: "Ternary Search
Trees" (due to a fast implementation of the Levenshtein Distance
algorithm). However in SQL Server 2000 the equivalent to sue is called
"indexed views".
My question is am I right? Can anyone out there give me a few pointers
i nthe right directions please? Any comments/suggestions/help greatly
appreciated...
Cheers,
Al.
Hi,
Indexed views would have nothing in particular to do with advanced search
algorithms.
You may wish to investigate the SOUNDEX and associated functions. See Books
Online.
Thank you,
Daniel Jameson
SQL Server DBA
Children's Oncology Group
www.childrensoncologygroup.org
<almurph@.altavista.com> wrote in message
news:1163420393.594947.317930@.k70g2000cwa.googlegr oups.com...
> Hi,
>
> Hope you can help me with this one. I'm building a search engine with
> a SQL Server 2000 box in the backend. If a user gets no result for some
> search but there is a close match - I want that match to be suggested
> (or any others).
> Now I believe that the technology to use is called: "Ternary Search
> Trees" (due to a fast implementation of the Levenshtein Distance
> algorithm). However in SQL Server 2000 the equivalent to sue is called
> "indexed views".
> My question is am I right? Can anyone out there give me a few pointers
> i nthe right directions please? Any comments/suggestions/help greatly
> appreciated...
> Cheers,
> Al.
>