|
Just had another thought - download Sql Server Management Studio (should be free) and then you can see the database schema to find out exactly how that data is stored on your database. I interpreted your comment about date storage as being dates in general
|
|
|
|
|
3 bytes to store a date?
Ok, I believe that.
When I went into this project, I told the customer that I wasn't going to change the database design, unless it was needed. I did have to change the size of the username, wasn't large enough.
I'll start rethinking the dates again.
Thanks for debunking my date theory
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|
|
You can see the storage size for each of the types in the documentation - for example:
Storage size: 3 bytes, fixed
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Very helpful Richard
So I guess I meant ISO 8601, but I called it ISO120 which is my bad.
YYYY-MM-DD
So if that's the native format for Date stored in bytes, I guess converting SmalDateTime to 120 to just give me the date and strip off the time isn't that bad.
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|
|
Yes it is bad. Always use the correct data type for the content. If you insist on using strings you can run into all sorts of issues with international settings
|
|
|
|
|
Hey all,
there is a MSSQL table with such data,
categoryName specificationValue unitName
Display 15.6 inch
Display LED, HD, Anti-glare NULL
Processor CORE I3 NULL
Processor 1005G1 NULL
Processor 1.2 UP TO 3.4 GHz
Graphics Card INTEL NULL
Graphics Card Intel UHD Graphics NULL
System Memory 8 GB
System Memory DDR4 NULL
Hard Disk 256 PCIe® NVMe™ SSD GB
Operating System Windows 10 Home NULL
Operating System 64 bit
Optical Drive DVD NULL
Physical 1.78 kg
I need to get the following line (is it even possible?)
15.6inch LED, HD, Anti-glare | CORE I3 1005G1 1.2 UP TO 3.4 | INTEL Intel UHD Graphics | 8 GB DDR4 | Windows 10 Home 64bit | DVD | 1.78kg
To be honest, I don't really understand how to do this
need your support
thanks!
|
|
|
|
|
Depends on your version of SQL Server.
If it's 2017 or later, it's relatively simple. If it's earlier, not so much.
See here: The SQL Server Equivalent to GROUP_CONCAT()[^]
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
thanks for fast reply!
version 12 ((
|
|
|
|
|
I have a pipeline with a data flow that terminates in a sink that points to a linked data set (a sql server table). When I debug the pipeline, I can see that the sink data preview contains the rows I expected it to have. However, the actual sink table doesn't get populated by these rows. What am I missing?
Thank you
|
|
|
|
|
Is there anyone here that uses the Snowflake Azure database system? If so, please contact me directly. I'm stuck.
|
|
|
|
|
No on both counts, but have a beer on me.
|
|
|
|
|
Mike Ahrens wrote: Snowflake Azure database system Must . not . make . snide . comment.
Sorry never heard of it and would avoid it for 2 reason snowflake and azure . Good luck
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
|
The name comes from the design concept - The Data Cloud | Snowflake[^] . It's surprisingly okay.
The azure bit though - I'm with you on that
|
|
|
|
|
Yes we use Snowflake but I'm not contacting you directly. Explain what your problem is and I will try to help
|
|
|
|
|
That goes against the idea of the website. You are asking for an employer, or an expert to consult. This is not a place to hire people.
Snowflake can't be that hard if it is just a shell around Azure; but you did not post a question about code - you specifically ask for someone to contact you for some vague crap.
Do that again and I'll vote as abuse; here we share questions and answers. If you're looking for an expert in a specific area and do not want to disclose the question, then you in the wrong place.
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
My apologies. I hadn't seen anything on it in the forum. Just wanted to find out if there was anyone using it. I resolved the question that I had, after hammering around on it for several hours. I will ask in the proper place the next time.
|
|
|
|
|
You been regularly on this site, and you did not know we prefer questions over people recruiting?
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Not quite what I had in mind. Just wanted to see if there was anyone else using it. I have used SQL Server since it was created, and ran into a weird issue. If I hadn't figured it out, I would have posted a proper question.
|
|
|
|
|
Mike Ahrens wrote: Just wanted to see if there was anyone else using it No, you didn't, you asked specifically if they could contact you, without leaving a question.
Mike Ahrens wrote: If I hadn't figured it out, I would have posted a proper question. You did not post a question, but a vacancy. You could have found out by posting a question, which you did not.
Snowflake ain't that hard; but you looking here for something cheap, right?
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
"1"
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
I have a sample table you can see here. This self-referencing table is used for creating a tree structure in an Angular project. I want to write a SQL query to create a JSON result with a parent-child structure. Please help me.
|
|
|
|
|
You can't use FOR JSON to generate recursive JSON documents. You'll need to create a recursive user-defined function instead.
CREATE OR ALTER FUNCTION dbo.fn_OrganizationJson(@ParentId int)
RETURNS nvarchar(max)
As
BEGIN
DECLARE @json nvarchar(max);
If @ParentId Is Null
BEGIN
SET @json = (SELECT Id, Name, dbo.fn_OrganizationJson(Id) As Children FROM dbo.Organizations WHERE ParentId Is Null FOR JSON AUTO);
END
Else
BEGIN
SET @json = (SELECT Id, Name, dbo.fn_OrganizationJson(Id) As Children FROM dbo.Organizations WHERE ParentId = @ParentId FOR JSON AUTO);
END
Return @json;
END
GO SQL Fiddle[^]
NB: In some versions of SQL, you can't create a function that refers to itself if the function doesn't already exists. You may need to CREATE FUNCTION first with a dummy body, and then ALTER FUNCTION to add the implementation.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hi,
I want to write a program whose input is the names of the companies and when adding the name of each company, it will take various information from that company of different types,
1- TextBox (daily production rate),
2- CheckBox (select product features),
3- OptionButton (the gender of the company owner),
4- Date (Product delivery time, yy/mm/dd), ... in a form and store all that information in the profile of that company.
What programming language should I use for this task so that I can design a beautiful appearance (GUI) for entering information and this information can be entered easily by the user?
Is there a pre-written program that is close to my goal so that I can improve it to suit my needs?
Thanks in advance.
|
|
|
|
|
niksirat2030 wrote: What programming language should I use for this task so that I can design a beautiful appearance (GUI) for entering information and this information can be entered easily by the user?
You should use the language you know the best.
|
|
|
|