Showing posts with label column. Show all posts
Showing posts with label column. Show all posts

Monday, March 26, 2012

new table to ASPNetDb.mdf and foreign key

I was thinking of adding tables to ASPNetDB.mdf and have one of those tables have column userid as a foreign key from aspnet_Users

When I try to create relationship in Diagram, I get error saying that "data typ properties does not match"

userid in aspNet_Users is uniqueidentifier and userid (fk) in new table is int

What should I use, should I do that at all?

Thanks

uniqueidentifier and int is of different type. correct me if i'm wrong, the foreign key must be of same type as the primary key.|||

yes, but even when I use same type it gives me the same error

|||

Try to compare your new table with aspnet_Membership table, this table has an existing relationship with aspnet_Users table. Maybe you are missing a declaration of keys. As you can see both tables has UserID and they are tagged as a primary key and created a relationship based on that keys, but you can always have an option to make it an additional key instead of a primary.

Hope this helps.

|||That helps, good advice. I was able to connect keys from membership table with no problems. Thank you.

Wednesday, March 21, 2012

New SQL Datatypes

I started experimenting with SQL Server 2008, June CTP. So the first thing I tried to do is to create a new table having as column types the new datatypes available in Katmai. According to a MS white paper new sql data types include Filestream, Date, Time. Does June CTP include those new types? Am I making a wrong assumption?

Thank you

All the new datatypes are scheduled for a later release, so unfortunately we'll just have to wait.

The what's new section i BOL is pretty handy if you wonder what you can play with Smile

|||As referred you might have to wait or see for next 2 CTP releases on the changes, if you have observed in Katmai BOL or not there are blank placeholders for such features inclusion or make them deprecated based upon the CONNECT feedback or by popularity.sql

Monday, March 19, 2012

new records in table

i have a situation where i have table A with 50 records, )with no timestamp column). Data will be appended to it on a constant basis, daily. how can you filter out the new records?

Can you please post the schema of the table or a sample of it? Does it have an identity column for example? If so, you could capture the MAX identity value after every day and determine the new rows. But this will only give rows that were added not modified. You can use similar approach if you have a key that has some time part in it. But this all depends on your data. Often it is best to use staging table approach so that you don't have to go to the main table(s). You can insert first into the staging table and then update the main table. This will allow you to do additional processing using the rows from the staging table.

Friday, March 9, 2012

New line in column?

Is it possible?
Sp1 said:
New Lines in Expressions
Previously, expressions had to be contained on a single line. With
SP1, expressions can include a newline character. New line characters
include carriage return (CR), line feed (LF), carriage return and
line feed (CRLF), paragraph separator (Unicode 2029), and line
separator (Unicode 2028). The newline characters are replaced with a
space when the report is processed.
But I can't use it.
Please help me!
--
Composed with Newz Crawler 1.7 http://www.newzcrawler.com/Could you please post an example of how you're using it?
--
Ravi Mumulla (Microsoft)
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Sean.Xiao" <ydxiao@.suntowntech.com> wrote in message
news:ufUQ64dhEHA.1656@.TK2MSFTNGP09.phx.gbl...
> Is it possible?
> Sp1 said:
> New Lines in Expressions
> Previously, expressions had to be contained on a single line. With
> SP1, expressions can include a newline character. New line characters
> include carriage return (CR), line feed (LF), carriage return and
> line feed (CRLF), paragraph separator (Unicode 2029), and line
> separator (Unicode 2028). The newline characters are replaced with a
> space when the report is processed.
> But I can't use it.
> Please help me!
> --
> Composed with Newz Crawler 1.7 http://www.newzcrawler.com/|||These textbox expressions/values were entered using the expression editor.
The first item, in the examples, is the textbox expression/value while the
second is how it should render. Hopefully these will point you the right
direction for using VB constants in expressions.
Example 1
--
="The brown fox jumped" & vbcrlf & "over the fence
The brown fox jumped
over the fence
Example 2
--
The brown fox jumped
over the fence
The brown fox jumped
over the fence
Example 3
--
="The brown fox jumped" &
" over the fence"
The brown fox jumped over the fence
For more information about constants see Visual Basic Language Reference,
Print and Display Constants:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vblr7/html/vamscmiscellaneousconstants.asp
--
Bruce Johnson [MSFT]
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Sean.Xiao" <ydxiao@.suntowntech.com> wrote in message
news:ufUQ64dhEHA.1656@.TK2MSFTNGP09.phx.gbl...
> Is it possible?
> Sp1 said:
> New Lines in Expressions
> Previously, expressions had to be contained on a single line. With
> SP1, expressions can include a newline character. New line characters
> include carriage return (CR), line feed (LF), carriage return and
> line feed (CRLF), paragraph separator (Unicode 2029), and line
> separator (Unicode 2028). The newline characters are replaced with a
> space when the report is processed.
> But I can't use it.
> Please help me!
> --
> Composed with Newz Crawler 1.7 http://www.newzcrawler.com/|||2004-08-20 00:32:50
"Bruce Johnson [MSFT]" <brucejoh@.online.microsoft.com> wrote in
message
<udj2toghEHA.556@.TK2MSFTNGP10.phx.gbl>
> These textbox expressions/values were entered using the expression
editor.
> The first item, in the examples, is the textbox expression/value
while the
> second is how it should render. Hopefully these will point you the
right
> direction for using VB constants in expressions.
>
> Example 1
> --
> ="The brown fox jumped" & vbcrlf & "over the fence
>
> The brown fox jumped
> over the fence
>
> Example 2
> --
> The brown fox jumped
> over the fence
>
> The brown fox jumped
> over the fence
>
> Example 3
> --
> ="The brown fox jumped" &
> " over the fence"
>
> The brown fox jumped over the fence
>
> For more information about constants see Visual Basic Language
Reference,
> Print and Display Constants:
> http://msdn.microsoft.com/library/default.asp?url=/library/en-
us/vblr7/html/vamscmiscellaneousconstants.asp
>
> --
> Bruce Johnson [MSFT]
> Microsoft SQL Server Reporting Services
>
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
>
> "Sean.Xiao" <ydxiao@.suntowntech.com> wrote in message
> news:ufUQ64dhEHA.1656@.TK2MSFTNGP09.phx.gbl...
> > Is it possible?
> >
> > Sp1 said:
> >
> > New Lines in Expressions
> >
> > Previously, expressions had to be contained on a single line.
With
> > SP1, expressions can include a newline character. New line
characters
> > include carriage return (CR), line feed (LF), carriage return and
> > line feed (CRLF), paragraph separator (Unicode 2029), and line
> > separator (Unicode 2028). The newline characters are replaced
with a
> > space when the report is processed.
> >
> > But I can't use it.
> >
> > Please help me!
> > --
> > Composed with Newz Crawler 1.7 http://www.newzcrawler.com/
--
Composed with Newz Crawler 1.7 http://www.newzcrawler.com/|||Ok,Thanks Bruce.
--
Composed with Newz Crawler 1.7 http://www.newzcrawler.com/

Monday, February 20, 2012

new custom flat file connection manager component

The standard flat file connection component does not handle flat files with different column counts on different rows. Since that's the type of file I have to read, I like to create a modified version of the flat file connection manager that can do this. I have found some info in how to create a connection manager. But I can't find anything that tels me how to build one that would be recognized by the flat file source dataflow component.

So how do you build an connection manager that can used by the standard flat file source component? Anyone ever did this or knows were to get the docs?

I know my problem is also solvable by reading the row into a single column and then using a script component to split them but that is not the solution I want.

The new connection manager is not going to solve this problem. The parsing logic is not part of the connection manager, it is part of the Flat File source adapter. You would need to build a new source, not connection manager.

Thanks,

Bob