Showing posts with label thru. Show all posts
Showing posts with label thru. Show all posts

Sunday, March 25, 2012

Bulk Insert ZERO rows returned...

I have poured thru notes, sites, etc. and can't seem to figure what I might be doing wrong - which most likely is something very easy.

BULK INSERT

dbo.tbCheckpoint

FROM 'c:\inetpub\wwwroot\upload\maxie_task_aging.csv'

WITH

( DATAFILETYPE = 'char', FIELDTERMINATOR = ', ',

FIRSTROW = 3, KEEPNULLS, ROWTERMINATOR = '\t\n')

I am doing a bulk insert where I am pulling from .csv but the msg I get when running it is

(0 row(s) affected)


There is data in the file, it starts on the 3rd row and terminators are set correctly.

Any thoughts?

Moving to the transact-SQL forum.|||Have you checked to see if the .csv file ends with a carriage return/line feed? I have seen cases where the insert would fail because the csv, as a whole, was not terminated properly. It's definitely worth a "look see", so to speak. If the file is missing a carriage return, add it, then try the import again.|||Thanks! That was it.

Sunday, February 12, 2012

Building a report

I have been "Thrown to the wolves" and need to learn Visual Studio and Reporting Services thru the scholl of hard knocks. I have had about 5 years a self teaching on Microsoft Access and 2 months of SQL Server. Not by any means a pro but I'm learning.

I put my SQL in the Data tab. I go to layout. I have made a couple of reports using the table and subreport in the toolbox. However when I try to drag and drop the fields into the body without a table all that previews is the first field.

When I drop the field in the body it comes out=First(Fields!fldname.Value) or=Sum(Fields!fldname2.Value)

I'd like to get this a continuous report(form). I hope I'm explaining this well enough. I'm going top Barnes and Noble today to get a book but in the meantime does anyone understand what I'm looking for?

I tried finding it on BOL but it didn't help me that much.

Hi

you can also use List to place labels inside. List is similar to Table(Grid) as you can place fields inside, but list does not force you to have table layout.

-yuriy

|||

Hi, I am not sure what you are trying to ask, if you are bugged that when you drag/drop a field it comes like =First(Fields!fldname.Value) instead of

=Fields!fldname.Value, then you can edit this directly or right click in textbox ot table cell and go to Expressions and there you can create an expression using different functions,variables, parameters and fields.

I apologise if I am tootally off the track.

|||

No apologise necessary. I can't explain what I'm looking for well.

I grab a field from my fieldlist and drop it in the body. I go to preview and all that comes up is the first record in my result set. How do I make it a continous report so I have the first record, the last record and everything in between.

I'm able to do this if I create a table in the body and drop the fields in the details portion of that table. However that is too structured for some of the reports I'm looking for.

|||

Drag LIST control to your report first. Configure it to repeat records from your source. Then drag fields into the LIST control.

|||

Yes,

That works. Well I haven't tried the configure part yet but I create a list, drag the field in the list and BAM there it is. Great answer thank you.

|||

You can only use the data regions available to build reports, and they are sufficient to build most of the reports, go through the report design basics(http://msdn2.microsoft.com/en-us/library/ms159253.aspx) and Data regions available in reporting services and you should be able to design more complicated reports with a combination of these data regions(http://msdn2.microsoft.com/en-us/library/ms157134.aspx) .

Still if you have some problem designing the report you can post your specific requirement and we will try to help.

Building a new database on SQL Server 2000 cluster

The environment: Windows Server 2003, SQL Server 2000 Enterprise Edition Clu
ster (2 boxes)
The I attach th the SQL Server Thru Enterprise Manager, right -click databas
es, and select new database...I can type the name of the new database, but w
hen I go to look for the other drives in the cluster I can only see the (Mas
ter) drive ...where SQL Ser
ver is installed. How can I view all of the current resources (drives) owne
d by that node in the cluster?
Thanks,
WarrenYou have to add them to the cluster ... This is in cluster administrator.
"Warren Tyler" <anonymous@.discussions.microsoft.com> wrote in message
news:41DA8BCE-72D7-41AF-9A9A-5DD06DBCF760@.microsoft.com...
quote:

> The environment: Windows Server 2003, SQL Server 2000 Enterprise Edition

Cluster (2 boxes)
quote:

> The I attach th the SQL Server Thru Enterprise Manager, right -click

databases, and select new database...I can type the name of the new
database, but when I go to look for the other drives in the cluster I can
only see the (Master) drive ...where SQL Server is installed. How can I
view all of the current resources (drives) owned by that node in the
cluster?
quote:

> Thanks,
> Warren
|||Thanks Wayne.
I can see all the drive within the cluster administrator. Is there another
step that i didn't do? The fail-over works perfectly and each node owns it'
s own resources. But I can view the different drives within Enterprise Manag
er...
Thanks,
Warren Tyler|||Correction on the above entry..
I can't view any of the drive from within Enterprise Manager

Building a new database on SQL Server 2000 cluster

The environment: Windows Server 2003, SQL Server 2000 Enterprise Edition Cluster (2 boxes
The I attach th the SQL Server Thru Enterprise Manager, right -click databases, and select new database...I can type the name of the new database, but when I go to look for the other drives in the cluster I can only see the (Master) drive ...where SQL Server is installed. How can I view all of the current resources (drives) owned by that node in the cluster?
Thanks
WarrenYou have to add them to the cluster ... This is in cluster administrator.
"Warren Tyler" <anonymous@.discussions.microsoft.com> wrote in message
news:41DA8BCE-72D7-41AF-9A9A-5DD06DBCF760@.microsoft.com...
> The environment: Windows Server 2003, SQL Server 2000 Enterprise Edition
Cluster (2 boxes)
> The I attach th the SQL Server Thru Enterprise Manager, right -click
databases, and select new database...I can type the name of the new
database, but when I go to look for the other drives in the cluster I can
only see the (Master) drive ...where SQL Server is installed. How can I
view all of the current resources (drives) owned by that node in the
cluster?
> Thanks,
> Warren|||Thanks Wayne
I can see all the drive within the cluster administrator. Is there another step that i didn't do? The fail-over works perfectly and each node owns it's own resources. But I can view the different drives within Enterprise Manager..
Thanks
Warren Tyler|||Correction on the above entry..
I can't view any of the drive from within Enterprise Manager